Mink icon indicating copy to clipboard operation
Mink copied to clipboard

Invoking UI for a large number of mementos causes a significant delay before displaying

Open machawk1 opened this issue 6 years ago • 2 comments

With a fresh Mink from source (e.g., 7d4024e), go to webcitation.org, which has 1373 (not a particularly large number of) mementos -- enough to reproduce this behavior. After the page has loaded, click the Mink icon and note the multi-second delay before the UI is displayed.

This has very much to do with the UI being built on invocation. The rationale of doing it this way is to prevent the execution of UIs being built but never displayed.

machawk1 avatar Mar 28 '19 13:03 machawk1

Within displayMinkUI.js in the function appendHTMLToShadowDOM(), the call to local storage chrome.storage.local.get('timemaps', function (items) { seem to produce a signal delay, as evidenced by console/alert messages immediately before and within the call.

machawk1 avatar Aug 19 '19 18:08 machawk1

With regard to use the webcitation URI-R above, the multi-second delay only seems to occur when the localstorage is very large, e.g., cnn.com was queried before-hand. Clearing the cache, loading webcitation, and invoking the Mink shadow DOM UI is nearly instantaneous with webcitation.org.

This issue remains. When the cache is very large, the time taken for the UI to appear when the Mink icon is clicked grows.

machawk1 avatar Aug 19 '19 19:08 machawk1