Active
Project:
CSS Watch
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Mar 2011 at 14:50 UTC
Updated:
27 Mar 2011 at 19:21 UTC
I have been playing with this module for a week or so now and have been experiencing slow poll times per stylesheets (somewhere around 1 second per file), when there are a number of stylesheets to poll this soon becomes unworkable and locks up the browser.
In my working copy I have changed css_watch_css_alter() to use an options array instead of looping over all existing stylesheets. Maybe this is a more workable solution?
Comments
Comment #1
psynaptic commentedI tried to contact the maintainer as the maintainer status on the project page says 'seeking co-maintainers' but I have yet to receive any response.
Therefore, I forked this module on github and fixed a good few issues:
https://github.com/psynaptic/css_watch
It implements selection of stylesheets to poll for changes, which improves performance. It also changes from synchronous to asynchronous xhr to avoid locking up the browser during polling.
Comment #2
KrisBulman commentedThanks for the github info for your fork! Will you be seeking co-maintainership if the author responds?
Comment #3
Dustin Currie commentedHi psynaptic,
I'll take a look at the fork. In dev versions I've been using async. Your second post gets at perf issues. The problem isn't in page generation, so speeding up array looping in a hook won't have any effect. Stylesheet selection may be an ideal solution. I'll take a look.
Thannks!
Comment #4
psynaptic commented@KrisBulman: I am seeking co-maintainership of this module, I asked for it in my initial email to Dustin but I didn't get a response so either I didn't look like a good candidate or the email slipped under the radar.
@Dustin Currie: Thanks for your response. I was considering the idea of moving the polling to the server side as this seems to be the main bottleneck. If we could come up with something that lives on the server and watches the files, if any are modified the server would send a message to a listener in the browser to trigger the filename change. I don't know exactly how feasible this is but it could be the ideal solution. I think the stylesheet selection is just a stopgap for now until we make it work for all theme CSS files.