iTwin / itwinjs-core

Monorepo for iTwin.js Library
https://www.itwinjs.org
MIT License
617 stars 210 forks source link

getCustomViewState3dData should return a pending response #4517

Closed pmconne closed 2 years ago

pmconne commented 2 years ago

Is your feature request related to a problem? Please describe.

4516 changes this function to query model ranges in a separate thread rather than inside the main JavaScript thread.

This raises the possibility that an extremely long query could cause the request to time out and the frontend to retry.

Describe the solution you'd like Memoize the requests and return a pending response so the frontend will not enqueue another request for the same information.

Describe alternatives you've considered Ignore the problem and hope it doesn't cause significant issues.

Additional context The potential for this issue is exacerbated by some highly-fragmented iModels caused by a temporary inability to vacuum checkpoints.

We probably want to backport this (and related changes) to 3.4.x.

aruniverse commented 2 years ago

We probably want to backport this (and related changes) to 3.4.x.

maybe we should test this out in gpb qa before backporting?

pmconne commented 2 years ago

I was just asking @nick4598 if he has a good way to test. I found no tests for it in itwinjs-core repo.

aruniverse commented 2 years ago

once a new nightly is published tn, i can update dev env tomorrow and myabe we can use that. not ideal for sure

pmconne commented 2 years ago

@nick4598 can you please file an issue to add integration/regression tests for getCustomViewState3dData?

nick4598 commented 2 years ago

Yep, I'll open that tomorrow.

Here: https://github.com/iTwin/itwinjs-backlog/issues/485