Ignore:
Timestamp:
2020-07-23T21:07:18+12:00 (4 years ago)
Author:
ak19
Message:

Client-GLI was noticeably slow compared to GLI when swapping between format statements or when typing anything into a format statement. The cause was my own mistake from 9 years ago (commit revision 24424) when I didn't know that the CollectionManager.built() operation was an expensive remote call in the case of IsGsdlRemote. This function was being called to determine if the previewbutton should really be available (enabled or disabled) so that the user could not accidentally attempt to preview an unbuilt collection. However, I must not have realised back then that the previewbutton was being set this way at every character added into the Format statements editor, as well as when swapping between one format statement and another. As a result, all of such user action was being severely delayed when isGsdlRemote was true. Fixed this now by adding a function CollectionManager.previewAvailable() that returns the last known result of the built() call. Client-GLI's format pane is now thankfully so much faster, rather than a pain to use.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/src/org/greenstone/gatherer/gui/FormatPane.java

    r24424 r34286  
    123123    // unbuilt (as could happen when someone clicks on a format statement before
    124124    // building the collection), then shouldn't enable previewing.
    125     if(ready_to_preview && !Gatherer.c_man.built()) {
     125    if(ready_to_preview && Gatherer.c_man.previewAvailable()) {
    126126        ready_to_preview = false;
    127127    }
Note: See TracChangeset for help on using the changeset viewer.