[Kst] Plugin updates

George Staikos staikos at kde.org
Thu Jul 8 00:28:05 CEST 2004


  Clearly there is a problem where plugin updates are called far too often 
right now, causing high CPU usage.  However, I think we have to be careful 
about how conservative we are in updates.  If we only update when input 
vectors have updated, then plugins can't use any external sources of 
information.  They may also have updated, and if we don't call update, then 
the plugin remains stale.  Any thoughts on how this should work?  Some of the 
obvious ones are:

1) track the last update counter value for the dependency vectors and only 
update() if the value has changed and an update has happened in that vector 
since then.
	problem: scalars are also dependencies
	problem: need to track the last "update" for each vector
	problem: external data sources not tracked
2) update the plugin whenever any vector changes during the update loop
	problem: scalars are also dependencies
	problem: inefficient
	problem: external data sources not tracked
3) ask the plugin if it wants to be updated
	problem: breaks out of the plugin definition as we try to conform to it
	problem: insufficient - it won't know if a scalar or vector has been updated 
so we need to combine this with 1) or 2) at least

It's not an easy problem.  I was wondering, what if we actually add another 
layer in here?
---------------------------
XML+C plugin|
-----------------
Kst Data Plugin
	C++ + desktop file
---------------------------

This greatly simplifies things internally I think.  We would provide an API 
and tools for plugin authors to write wrappers for their XML+C plugin which 
can do all the hard things we try [but fail] to do now.

-- 
George Staikos
KDE Developer				http://www.kde.org/
Staikos Computing Services Inc.		http://www.staikos.net/



More information about the Kst mailing list