I'm having a problem with performance of the program "dot" (for rendering
graphs) when called from a python cgi script, served by an apache virtual
host.  I'm writing this email both the apache httpd list as well as the
graphviz users lists (hoping some intersection might be useful).

I'm using OSX 10.5.6 and graphviz2.22 (built via macports).

When I run a simple python script that calls dot (via a system call) to
render a small graph, it takes about .04 seconds, which is normal.  But when
I run the same call via CGI script it takes roughly 100 times longer (4
seconds).     I've tried graphs of various sizes, ranging from very tiny
graphs (4 nodes) to much larger graphs.   The 4 seconds figure for the CGI
script doesn't change much except for very large graphs, so the time spent
in the CGI script is probably not coming from the actual rendering itself.

I posted this problem some weeks ago on these lists, and got the following
enlightening response:

>A hunch is that some cache is not seen or is not available.
>Could be the fontconfig cache.  It could be the case that you
>have a ~dyamins/.fontconfig but httpd is not able to create one
>and there is no system cache.

This did indeed seem to be the problem.  I wrote back:

> I do have a ~/.fontconfig directory containing cache files.  When I delete
it, the performance of the command line script is just as slow as the cgi >
script until the next time the command is run (e.g. after the cache is
remade).    So I  guess the question becomes: how do I get apache and the >
CGI script to see and use the .fontconfig caches?

However, I never received an answer about about how to get apache to see the
.fontconfig caches.

Any thoughts would be really appreciated.

Thanks,
Dan

Reply via email to