WARNING: This server is unstable and will be retired in the next days. If you want to keep this forum available, please request immediately a migration on the Nabble Support forum. Forums that don't receive any migration request will be deleted forever.

 « Return to Thread: [jira] [Created] (VELOCITY-812) Parser.jj_scan_token very slow during debugging

[jira] [Commented] (VELOCITY-812) Parser.jj_scan_token very slow during debugging

by Velocity - Dev mailing list-2 :: Rate this Message:

| View in Thread


    [ https://issues.apache.org/jira/browse/VELOCITY-812?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13109594#comment-13109594 ]

Nathan Bubna commented on VELOCITY-812:
---------------------------------------

Just to be sure you know, that code is pretty much all generated by JavaCC.  You might try building Velocity with the latest JavaCC version to see if that helps.  We are not going to be applying any patches or fixes directly to generated code, as that is unmaintainable for us.

> Parser.jj_scan_token very slow during debugging
> -----------------------------------------------
>
>                 Key: VELOCITY-812
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-812
>             Project: Velocity
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: 1.7
>         Environment: linux, windows, tomcat 6 running via maven, JDK7 (but had same issue with JDK6)
>            Reporter: Konstantinos Kougios
>         Attachments: profile.png
>
>
> Parser.jj_scan_token runs very slowly during java debugging mode. I've allocated more than enough memory for Java (Xmx , Xss, PermGen) and made sure it is enough by monitoring via visualvm.
>  I am working on a springframework mvc project, with velocity as the template engine. Spring has a macro file that is loaded during startup : spring.vm (10kb). My box (6 core phenom processor) takes 10 seconds to parse that macro. After profiling with visualvm, I found out that 9 secs are spend on jj_scan_token method.
> When running the project without debugging enabled, the parsing is very fast.
> Please note that the issue occurs without any customization of velocity properties. Typically though the properties look like this:
> springMacro.resource.loader.cache=true,
> resource.loader=[springMacro],
> velocimacro.library=org/springframework/web/servlet/view/velocity/spring.vm,
> output.encoding=UTF-8,
> input.encoding=UTF-8,
> springMacro.resource.loader.class=org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
> Please note that I've tried removing the encoding, but still the problem persists.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...

 « Return to Thread: [jira] [Created] (VELOCITY-812) Parser.jj_scan_token very slow during debugging