https://bz.apache.org/bugzilla/show_bug.cgi?id=68054

            Bug ID: 68054
           Summary: DirResourcesSet: getCanonicalPath is very slow in
                    windows
           Product: Tomcat 9
           Version: 9.0.52
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: cocorosse...@gmail.com
  Target Milestone: -----

Noticed in windows, with tomee and jsf in DEVELOPMENT stage.

When JSF is in DEVELOPMENT mode, every facelet file is refreshed on every
access. This is very slow in windows, as you can see in this thread:
https://www.mail-archive.com/users@tomee.apache.org/msg17957.html . (we had the
same problem but never reported)

The problem is that DirResourcesSet is checking constantly this canonicalPath.
The problem is solved by setting allowLinking=true in context.xml.

One obvious workaround is to avoid checking two times the same getCanonicalPath
in:

                                if (entry.getCanonicalPath().length() >=
f.getCanonicalPath().length()) {
                                    canPath =
entry.getCanonicalPath().substring(f.getCanonicalPath().length());

This way time would be halved.


Another option is maybe to document the problem or produce a log warning if
windows, jsf in development mode and allowLinking=false?


I'm unable to provide a simple reproducer as it requires tomcat with jsf and a
xhtml with some includes/custom components/tag handlers.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to