Thread: [CEDET-devel] New kind of data cache
Brought to you by:
zappo
From: Eric M. L. <er...@si...> - 2004-02-19 01:35:00
|
I've introduced a new kind of data cache behind the API fcn in semantic-fw.el. The starting point is: `semantic-cache-data-to-buffer'. This will link a data structure to a specific region of a buffer. You can retrieve the data with `semantic-get-cache-data' iff the point is in the region. It may sound boring, but what's nifty is you can specify a lifespan for the data cache. I've used this with `semantic-analyze-current-context'. It caches the calculated context over the symbol that was found under point. A second call to this routine will return a previously calculated value. It gives the data a lifespan of `exit-cache-zone'. The data is automatically deleted when the cursor leaves the symbol region. This is very useful with the idle scheduler. Both summary mode and the completion mode need that context. This basically cuts the calculation time spent in the idle scheduler in half. Huzzah! Eric -- Eric Ludlam: za...@gn..., er...@si... Home: http://www.ludlam.net Siege: www.siege-engine.com Emacs: http://cedet.sourceforge.net GNU: www.gnu.org |