Bug #4946


Look-ahead search freezes

Added by ben leinfelder almost 14 years ago. Updated over 10 years ago.

Morpho Plugin
Target version:
Start date:
Due date:
% Done:


Estimated time:


In the ontology browser, quick typing will render the popup useless.
My hunch is that it will go away when we stop searching the class descriptions.

Actions #1

Updated by ben leinfelder almost 14 years ago

This still isn't the speediest feature. The implementation is naive in that it reconstructs the entire tree from the ontology model after each letter is typed (or if a letter is deleted).
A better approach might be to keep a Map<node, path> where the nodes are the classnames and those are searched each time - if the node has a match, it is included (perhaps added in the case that we end up deleting a few letters and therefore loosening the search criteria).
We'd still be creating the tree each time, but not searching the ontology for sub/superclasses.

Actions #2

Updated by Matt Jones almost 14 years ago

To make this fast, I think you'll want to use a specialized tree structure for the lookup index, rather than running queries per se. Ternary search trees, Patricia trees/Radix trees have been used for this in the past. Here are a couple of links to relevant information, including a couple of Java libs that implement them.

For ternary search trees:

For Radix and Patricia trees:


I haven't used these particular libraries, so I'm not sure how well they are implemented. They'd need to be tested at least. Hope this helps.

Actions #3

Updated by ben leinfelder almost 14 years ago

with the new[er] ontology palette, the look ahead searching might become less important. It's nearly impossible to get the cursor to stay in the field that "launches" the palette because it is brought to the front and receives focus. The search field that the palette provides does not do look-ahead searching and instead waits for you to hit enter/search button.

Actions #4

Updated by Redmine Admin about 11 years ago

Original Bugzilla ID was 4946

Actions #5

Updated by ben leinfelder over 10 years ago

  • Target version changed from Unspecified to morpho-plugin-0.9.0

Also available in: Atom PDF