Rack Elevation Lazy Loading
NetBox version
v4.3.1
Feature type
New functionality
Proposed functionality
add lazy loading to rack elevations
Use case
current solution does not scale
Database changes
No response
External dependencies
No response
add lazy loading to rack elevations
Please add more detail about your proposed implementation.
current solution does not scale
The list is paginated and will load only a fixed number of racks per request regardless of how many have been created.
@jeremystretch the pagination options can go up to 100, 1000 and users will happily pick it. This leads to requests eventually failing and unhappy users. Even with the pagination there is still 1 additional request for every rack on the page due to the use of the <object> tag, so 100 racks = 100 http requests
My implementation addresses the issue by only loading the racks as they are intersecting with the viewport, meaning only the racks on the screen are loaded (even if there are another 100+ on the page), the rest will load progressively as they are scrolled into the viewport. This means that there is a request per rack but only for the racks shown in the viewport ( as opposed to trying to load every rack on the page )
It looks like you have a PR in for this so assigning to you @tbotnz
This commit breaks UI;