ToDo marker performance

cyberian wrote on Sat Mar 12 13:32:39 CET 2005:
I have a idea how to speed up the refresh of ToDo markers.

At the moment, PerlToDoMarkerThread first deletes all autogenerated markers
and than scan the complete file for new markers to add again. This needs
2 seconds on a P4-3066 with 1 GB RAM.

The slowest part of delete a marker is the call of markers[loop].delete(),
but looping over the marker list is fast. 

So my idea is to store the attributes IMarker.CHAR_START, IMarker.CHAR_END,
IMarker.LINE_NUMBER and IMarker.MESSAGE as a "known marker list" and compare
in the "add marker" part (addTaskMarker(resource, ...)). So the PerlEditor
doesn't need to add already existing marks.

If a "marker to add" already exists in the "known marker list" remove from
the list and try next.

At the end, we will have a list with all markers to delete or an empty list
if there is nothing to delete. Side effect: eclipse doesn't need to rerender
the tasks view.

Second idea is to lookup only current line and make a full scan on file
opening.

Regards, Kai

Note: The above is an archived snapshot of a forum thread. Use the original thread at sf.net to post comments.