crkn-rcdr / sapindale

Sapper/Svelte access platform administration interface
2 stars 2 forks source link

Advise on throttling components/SlugResolver.svelte #77

Closed RussellMcOrmond closed 4 years ago

RussellMcOrmond commented 4 years ago

Steps to demonstrate problem:

RussellMcOrmond commented 4 years ago

Furthering a discussion that happened outside ticket.

I'm not sure if it is easy to encapsulate things within a component, rather than having this done outside the component.

Can the component export a function that can be used to pre-load a global variable that individual instances of the component could use.

Alternatively a function exported that could take a series of lookup keys and return a hash of states. That state could then be passed into (or bind:state ) individual instances.

We will want an /manifest/slug POST API method that takes an array of ID's to look up, similar to what CouchDB has.

RussellMcOrmond commented 4 years ago

The more I think about it, the more I believe a limit on the size of a list is needed. I can open around 2000 and things run fine, but after that it is slow even if I open one SlugResolver at a time.

I'm gong to investigate other ways to break the lists down when they are extremely large.