Re: Slowdown caused by RDF

Ben Martin <[email protected]>
Newsgroups gmane.editors.abiword.devel
Message-ID <[email protected]>
Thanks Simon for reporting this, and in so much detail! :)

I have committed a fix for this which fast tracks things if there are no
semantic items (using a bool cache). Other code can also now use 
if( !rdf->haveSemItems() )
   { return early; }
so that there should be no speed impact unless you are using RDF. Well,
there is always the getting of the rdf object and checking a single
bool, but that should be fairly minor.

On Mon, 2012-09-17 at 12:56 -0400, Simon Larochelle wrote:
> The new RDF code adds a function to ap_Toolbar_Functions.cpp:
> ap_ToolbarGetState_CursorInSemItem. This function is called all the
> time to update the toolbar state and it is called even when RDF is not
> used. The function is really slow for big files; it scales linearly
> with the cursor position after an initial calculation which scales
> quadratically with the cursor position. The initial calculation seems
> to be triggered every time the cursor is moved with the mouse. I think
> that this function needs to be removed or at the very least modified
> so that it does not affect people who do not use RDF. Note: I have no
> idea how important it is for RDF that this calculation be done
> continuously.
> 
> Simon
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.