ToDo marker performance

  • Kai Schröder
    Kai Schröder

    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