Old version
New version in development
Deprecated MonoRail 2 and prototype MonoRail 3
From the error msg, it looks like it's doubling the list
Server Error in '/' Application.
No views found. Searched for [/Views/Users/View.cshtml,/Views/Users/View.cshtml,/Views/Shared/View.cshtml,/Views/Shared/View.cshtml]
Serialization and deserialization already happens, but without using the model, which could help perf. Also validation needs to be inserted somewhere.
Currently it's using lex/Powerpack. Need to drop this ref and possibly improve performance.
When using application/json, it should serialize as simple json
Hey,
I'm still using NVelocity at work, however we are slowly upgrading our projects to .NET Core.
One of the only projects that I cannot remove and isn't on .NET Core is NVelocity.
I pulled all the files from this deprecated repository and re-created NVelocity as a .NET Standard 2.0 project.
https://github.com/phillip-haydon/NVelocity.Core
And have it running in App Veyor.
It's running on Windows with 1 failing test and Ubuntu with 2 failing tests.
https://ci.appveyor.com/project/phillip-haydon/nvelocity-core/build/1.0.10
What I want to know is, what am I required to do as part of the Apache license in order to make sure I don't do anything wrong?
Especially the error filter. It should be able to issue something like an ActionResult (to render a error page or a redirect)
Such a mess. Separate the form builder stuff and templates
As MR3 has not seen any development in the last three years, and MR2 is still seeing some activity (and probably much more usage), why don't we remove MR3 and call MR2 the standard version? I think some life could return.
I'm seeing a problem when I set "velocimacro.permissions.allow.inline.local.scope" to true. Occasionally macros are corrupted when I have multiple threads parsing unrelated templates.
Here's a project which spawns 10 threads and each thread parses a short template with a macro 1000 times. Over the 10000 iterations, it fails on my machine about 40 times.
Here's a project that reproduces the problem:
https://github.com/mikebridge/NVelocityInlineLocalScope
In this demo it creates macros for e.g. #abcde9() which is supposed to print "Hello From Thread #9". However, it will render as "#abcde9" (i.e. without the parentheses). I've also seen it render the macro value with parentheses.
If change inlineLocalScope to false, the test passes.
Since we need to support microformats, this enum will easily be a blocker.
We had the problem that the iis process of our web application started to go up to 100% cpu usage.
After analysing the dump we found out that we had several waiting threads inside the nvelocity code.
00007fffc6900cc8 System.Collections.Generic.Dictionary`2[[System.__Canon, mscorlib],[System.__Canon, mscorlib]].FindEntry(System.__Canon)
000000cbf0eac870 00007fff6f2c39fb NVelocity.Util.Introspection.ClassMap.FindMethod(System.String, System.Object[])
000000cbf0eac8e0 00007fff6f2c3074 NVelocity.Util.Introspection.IntrospectorBase.GetMethod(System.Type, System.String, System.Object[])
000000cbf0eac950 00007fff6f2c2b9b NVelocity.Util.Introspection.Introspector.GetMethod(System.Type, System.String, System.Object[])
000000cbf0eac9b0 00007fff6f2c24c4 NVelocity.Runtime.Parser.Node.ASTMethod.PerformIntrospection(NVelocity.Context.IInternalContextAdapter, System.Type, System.Object[])
000000cbf0eaca10 00007fff6f2c19a9 NVelocity.Runtime.Parser.Node.ASTMethod.Execute(System.Object, NVelocity.Context.IInternalContextAdapter)
000000cbf0eacb10 00007fff6f2b4dd3 NVelocity.Runtime.Parser.Node.ASTReference.Execute(System.Object, NVelocity.Context.IInternalContextAdapter)
000000cbf0eacba0 00007fff6f2b47ff NVelocity.Runtime.Parser.Node.ASTReference.Render(NVelocity.Context.IInternalContextAdapter, System.IO.TextWriter)
000000cbf0eacc20 00007fff6f2c4f48 NVelocity.Runtime.Parser.Node.ASTBlock.Render(NVelocity.Context.IInternalContextAdapter, System.IO.TextWriter)
000000cbf0eacc70 00007fff6f2ce7fe NVelocity.Runtime.Directive.Foreach.Render(NVelocity.Context.IInternalContextAdapter, System.IO.TextWriter, NVelocity.Runtime.Parser.Node.INode)
000000cbf0eacd20 00007fff6f2ce591 NVelocity.Runtime.Parser.Node.ASTDirective.Render(NVelocity.Context.IInternalContextAdapter, System.IO.TextWriter)
000000cbf0eacd60 00007fff6f2c4f48 NVelocity.Runtime.Parser.Node.ASTBlock.Render(NVelocity.Context.IInternalContextAdapter, System.IO.TextWriter)
000000cbf0eacdb0 00007fff6f2c41b5 NVelocity.Runtime.Parser.Node.ASTIfStatement.Render(NVelocity.Context.IInternalContextAdapter, System.IO.TextWriter)
Investigate a little more and msdn
http://blogs.msdn.com/b/tess/archive/2009/12/21/high-cpu-in-net-app-using-a-static-generic-dictionary.aspx
What is happening here, and causing the high CPU is that the FindEntry method walks through the dictionary, trying to find the key. If multiple threads are doing this at the same time, especially if the dictionary is modified in the meantime you may end up in an infinite loop in FindEntry causing the high CPU behavior and the process may hang.
more investigate...
as well the java implementation had the same bug
https://issues.apache.org/jira/browse/VELOCITY-718 (multi-thread merge causes 100% cpu)
so we decide to fix this and we replaced this
private readonly Dictionary<string, MethodInfo> methodCache = new Dictionary<string, MethodInfo>((IEqualityComparer<string>) StringComparer.OrdinalIgnoreCase);
private readonly Dictionary<string, MemberInfo> propertyCache = new Dictionary<string, MemberInfo>((IEqualityComparer<string>) StringComparer.OrdinalIgnoreCase);
with a ConcurrentDictionary.
private readonly ConcurrentDictionary<string, MethodInfo> methodCache = new ConcurrentDictionary<string, MethodInfo>((IEqualityComparer<string>) StringComparer.OrdinalIgnoreCase);
private readonly ConcurrentDictionary<string, MemberInfo> propertyCache = new ConcurrentDictionary<string, MemberInfo>((IEqualityComparer<string>) StringComparer.OrdinalIgnoreCase);
The pull request to fix this will follow soon.
Add server side validation and enable code generation on FormHelper
Could be similar to IModuleStarter in Castle.Extensibility. Needs to provide a way for programmers to disable/replace existing services. Also to gain access to providers and customize them (rest,serialization)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.