WeBWorK Main Forum

Admin tool navigation significantly slower on 2.19

Re: Admin tool navigation significantly slower on 2.19

by Sean Fitzpatrick -
Number of replies: 2

In my case, this is a course that was created from an archive of the same course last year, but all the problem sets are new.

Each one has about 12 problems, and there are so far no students enrolled.

If it's just me, I can live with it! I can't see anything I might be doing differently.

In reply to Sean Fitzpatrick

Re: Admin tool navigation significantly slower on 2.19

by Nathan Wallach -

I have also seen the "Set Details" page as loading very slowly, and may have found a cause and a workaround.

After some research, I suspect the problem is a fix made to the code which searches for possible problem header files to display as choices on this page. The corrected code now will search under all symbolic links in the course template directory, unless the links are included in $courseFiles{problibs} (which by default only includes Library, Contrib, and capaLibrary). In the past, it seems that the search would not actually search under symbolic links. In my case, I had relatively large local problem collections available via symbolic links. Delays in this search could also occur if there is any large directory tree under the course templates directory.

In my case, I seem to have gotten a significant improvement in performance of the Problem Set Details page by adding the two additional symbolic links being used in my courses to $courseFiles{problibs} by setting a local value for this in localOverrides.conf. It can also be done in course.conf for a specific course.

However, a quick hack to see if the search for header files is the cause of the slow loading of the Set Details page would be to edit lib/WeBWorK/Utils/Files.pm (under webwork2) and temporarily modify listFilesRecursive so that right after it defined @matches it would just return 

        return @matches;

so that no search will be run and then restart the server.

According to the commit message in GitHub a quick search, the listFilesRecursive routine is only be used for this specific search, so it should not break any other functionality while you are testing it.

https://github.com/openwebwork/webwork2/commit/567b80822165d1956a9260e06cdf73a0a0de1afe

In reply to Nathan Wallach

Re: Admin tool navigation significantly slower on 2.19

by Glenn Rice -
I wouldn't really call what you are doing a work around as it is not a bug. It is intended behavior. Using problibs is just what you should do for local libraries that are linked to in your courses templates directories.

I don't see why you would use your hack to check for a slow down. If you have a symbolic link that has a large number of files and directories in it, then that is certainly the reason for the slow down. Recursively searching a directory takes time if it has a lot in it. So in that case, just add it to to problibs so it is skipped when searching for header files.

Also note that this is not specific to symbolic links. If you have a subdirectory of your templates directory that has a large number of subdirectories and files in it, then you can also add it to problibs to skip it in the search.