Describe the bug
For a specific itwin model, while trying to zoom to specific elements (about 2200 count) using zoomToElements() API, the memory usage shoots up from around 400 Mb to 2.2 Gb and causes low memory warnings on iOS and eventual forced app closure by iOS.
More Tab -> Status Update (It may take a while to load the Tasks Panel)
Select filter options button on top right of 'Tasks' panel.
Select 'Everyone' for assignee and unselect 'This week' to remove filter for date. and press done.
Select the first task 'BLDG-3 - Area A - STR - Erect Primary Stell...'
Select 'Update status'
App will crash in a few seconds either at step 6 or step 7.
This happens because internally the elements associated with the task are selected for zooming.
Expected behaviour
iTwin web app code should not consume high memory for a zoom operation, or should try to clear memory on its own when receiving such a warning. Also, the number of elements is not too high.
Screenshots
NA
Desktop (please complete the applicable information):
OS: iOS
Browser WebKit inside iOS app
iTwin.js Version 2.19.53 (same results on 3.7.11)
Note: Although we prefer fix on 2.x, a 3.x will also be fine.
Additional context
See attached ElementIds.txt file for selection of elements to zoom
ElementIds.txt
Describe the bug For a specific itwin model, while trying to zoom to specific elements (about 2200 count) using zoomToElements() API, the memory usage shoots up from around 400 Mb to 2.2 Gb and causes low memory warnings on iOS and eventual forced app closure by iOS.
To Reproduce iModel URL: https://qa-connect-imodelhubwebsite.bentley.com/Context/3fb9cf1e-4d1a-4f21-abf4-313b5f88ddac/iModel/68715f9b-c6c2-43f7-a9d7-fa94a323661f
Synchro Control URL for model: https://qa-construction.bentley.com/3fb9cf1e-4d1a-4f21-abf4-313b5f88ddac/manage-imodel/unified-viewer/68715f9b-c6c2-43f7-a9d7-fa94a323661f
Reproduce using developer's own iOS App.
Reproduce using Synchro Field App
App will crash in a few seconds either at step 6 or step 7. This happens because internally the elements associated with the task are selected for zooming.
Expected behaviour iTwin web app code should not consume high memory for a zoom operation, or should try to clear memory on its own when receiving such a warning. Also, the number of elements is not too high.
Screenshots NA
Desktop (please complete the applicable information):
Additional context See attached ElementIds.txt file for selection of elements to zoom ElementIds.txt