Skip Menu |

This queue is for tickets about the Contentment CPAN distribution.

Report information
The Basics
Id: 13312
Status: resolved
Priority: 60/60
Queue: Contentment

People
Owner: hanenkamp [...] cpan.org
Requestors: hanenkamp [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.009_008
Fixed in: 0.009_015



Subject: System is mighty slow
The system could be greatly enhanced by taking advantage of the caching system provided by Mason. Should also return better headers for static content, like images, theme styles, etc.
Running the Perl profiler on the system revealed that the slowness is mostly caused by compilation. Which is good and bad. Good because it means that my own code isn't that slow, just compiling it. Bad because the only target currently in use is CGI, which requires recompiles every time. Part of the reason for this target is that CGI is universally supported (and my primary host, DreamHost, doesn't support mod_perl currently). I am looking into creating a FastCGI target and a mod_perl target. FastCGI is supported by my primary host. I'm going to probably add that next and see how things improve. mod_perl might follow soon after. However, with the addition of different targets, the need for unit tests increases, so I'll probably work on that too.
Added a bunch of is_debug statements in all the .pm files, which didn't really help (nor did I expect it to, but I should be in the habit of this anyway). Need to do the same for all the content files. I also added the FastCGI interface, which is as abysmally slow as the CGI interface, so it looks like my initial review was actually quite wrong. I'm going to analyze the profiler data more carefully and see if I can find a few better algorithms in critical spots to improve the situation and probably added little tweaks here and there as well.
Oh, and the FastCGI and is_debug changes were made in 0.9b11.
Turns out that my FastCGI implementation worked, but I'd misconfigured Apache. Anyway, the FastCGI target shaves off a few seconds on each request, which makes it almost tolerable. As a work-around I tweaked the .htacess file so that you can drop static files under htdocs to let Apache server those files without any interference from Contentment. That optimization helps enough for now, I'm going to keep profiling those to work out more speed issues. However, for the moment, the immediate speed issues are resolved.