[Kss-devel] Optimizing polling with kss timeout
jc at upfrontsystems.co.za
jc at upfrontsystems.co.za
Tue Jun 12 14:45:31 CEST 2007
Hi Everyone,
I'm busy writing an instant messenger client for Plone using kss.
The messenger makes use of polling (using kss timeout) to ask the chat
service (that stores the messages) whether there are any new messages
for the currently logged in member.
The kss:
div#message-area:timeout {
evt-timeout-delay: 2000;
action-server: kss_update_message_area;
kss_update_message_area-contact: currentFormVar('contact_id');
}
When I shutdown the zope server that the messenger is running on, the
browser continues to poll. This causes the cpu usage of my pc to spike
every time a timeout fires. By compacting several kss entries into the
one you see above and then calling only one script, I've been able to
bring these spikes down to about 50% (they were above 90% before) of
total cpu usage.
Does anyone else have any advice of suggestions on how to further
reduce the cpu load on the client side?
AFAIK the trunk has been merged with comment stripped code. Can I use
a checkout of the trunk as it is currently, for usage in a production
environment and will it have a significant impact on the cpu issue?
Thanks in advance
JC
More information about the Kss-devel
mailing list