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 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 a normal (short) amount of time. But when I run the same call via CGI script it takes roughly 100 times longer. I wrote to the Apache and graphviz lists about this problem and got the following response:
A hunch is that some cache is not seen or is not available.This seems precisely to be the problem. 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).
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.
So I guess the question becomes: how do I get apache and the CGI script to see and use the .fontconfig caches? I posted this question back to the apache list and got the following responses:
> On Mac OS X Apache runs as the user www, which does indeed have its shell set to /usr/bin/false so you can't log in to it.
> Maybe there's an environment variable that can be set to tell fontconfig to look for its caches somewhere else? You might need to ask the fontconfig list about that.
>Apache doesn't care about them. Maybe your CGI does, but setting up
>the execution environment for your CGI isn't really something OT here.
>write to the fontconfig list
>When you run your script (any script) as a cgi program under Apache, it runs under the user-id under which Apache itself runs.
>That user-id may, or may not, have the same environment as when you run the script from the command-line, under (presumbaly) your own user-id.
>If the environment for your own user-id includes some environment variables which need to be set to indicate to the script where to find certain things
>What we Apache guys do not know, is what exactly your script needs as an environment. That is off-topic here, and you must find this out in the appropriate command documentation, or on some related help forum.
So I'm to your list to ask if any of you know how I should proceed. Please let me know if I haven't provide enough, or the right, information,
Thanks!
Dan
_______________________________________________ Fontconfig mailing list Fontconfig@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/fontconfig