Pomona icon indicating copy to clipboard operation
Pomona copied to clipboard

It would be nice to get a warning about too much lazy-loading.

Open jarlrasm opened this issue 11 years ago • 2 comments

The pomona client should provide a warning if a certain number of lazy resources, that could be fetched with expand, has been requested from a single parent resource.

Something like: pomonaClient.AddLazyThresholdWarning(numberOfLazyCalls,(x)=>DoSomething(x))

jarlrasm avatar Jul 30 '14 09:07 jarlrasm

I think this is a good idea, at least as a opt-in thing. Maybe even having it enabled by default with a high enough threshold.

For this to work the proxies of an "expand-session" would have to share some state.

Regarding the configuration style; I would prefer the client to stay immutable and stateless. The client constructor could maybe take a settings object containing this information?

BeeWarloc avatar Aug 08 '14 06:08 BeeWarloc

Btw, the state object for the current "expand-session" could also serve as a first-level cache to avoid repeated loading of the same resource. That would probably be useful a optimization.

BeeWarloc avatar Aug 08 '14 06:08 BeeWarloc