-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
should call finishUpdateItems to finalize updateItems #1
Comments
Thanks for checking the provider out! I'm trying to figure out the right way to sync narrow UI updates with the diagnostics service updates, but i haven't quite figured it out yet. If you don't mind, i have a few questions about this:
|
Whole flow is this
Each time, ui call
Humm, it's difficult, you can manually fire So, if you can subscribe event to update diagnostics push, then fire Also refer narrow bundled core-providers to get some ideas. |
I noticed this from GIF, where updating indicator (
x
icon) remainrunning
state.This is because
ProviderBase.protototype.finishUpdateItems
is not called.Updating items must be finalized to notify narrow-ui to finish updating.
Basically you have two pattern to finalize
Option-1:
finishUpdateItems(items)
: Use this if you update items in single response against request from UI.Option-2:
updateItems(items)
: You can update(render) items multiple times against single request.finishUpdateItems()
: Then finalize with empty arg.Why narrow provide option-2 is,
search
provider collect items on eachdata
event of event emitter which is emitted multiple-time.So when you search
foo
, the result is updated separately on eachdata
event.This prevent big items consume huge heap memory and blocking event-loop long-time while preparing new item-list on UI.
The text was updated successfully, but these errors were encountered: