-
Notifications
You must be signed in to change notification settings - Fork 214
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
Load all subcategories when creating a default view. #6882
Conversation
hl662
commented
Jun 20, 2024
•
edited
Loading
edited
- Adds new method to fetch all subcategories from used spatial categories.
- Explicitly call that method to populate the subcategories cache on default 3d view creation.
As previously discussed, paging was introduced because we observed truncated responses when too many subcategories existed. |
Hey @pmconne, is there a way to reproduce a case in QA, where a response is truncated? It doesn't have to be the query subcategories method. If we're concerned about the response being truncated where either some of the subcategories missing, or the response body itself being incomplete, createDefaultView can fallback to using the original implementation, where querySubCategories is paged. |
I also wanted to ask this because I couldn't find an iModel with enough subcategories returned that would elicit a truncated response |
I no longer have access to an iModel that produced the problem. Try going back in git history to find when paging was added and see if the PR provides any useful information. |
I went back to the earliest PR on discrete viewport sync events, and that's the earliest in the git tree, but I couldn't find any useful information... To address concerns regarding truncated responses, I've added a try/catch block within the non paging logic of querying the subcategories. If the response is bad, or the subcategories retrieved are incomplete, the original behavior will be fell back upon, which includes the standard paging logic. This ensures we will fill up any missing subcategories, or the case where the json returned is syntactically broken. |
Got a test to prove it works? |
I've added a test for the behavior we're looking for. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a new RPC interface function queryAllUsedSpatialSubCategories
. Do not alter the existing APIs.
Co-authored-by: Paul Connelly <22944042+pmconne@users.noreply.github.com>
Co-authored-by: Paul Connelly <22944042+pmconne@users.noreply.github.com>