CustomStoragesLoader creates storage on every exec_module #11768

Closed
opened 2025-12-29 21:49:39 +01:00 by adam · 0 comments
Owner

Originally created by @arthanson on GitHub (Oct 22, 2025).

Originally assigned to: @jeremystretch on GitHub.

NetBox Edition

NetBox Community

NetBox Version

v4.4.4

Python Version

3.10

Steps to Reproduce

In the CustomStoragesLoader class in exec_module it inits an instance of storage for every call to the function (for every script reference - even on a Script list view). In the case of storage backend like S3, this can add significant and linearly increasing overhead for every script file on the page.

Note: Follow on to Issue #20574

Expected Behavior

Constant (low) page load time on /extras/scripts

Observed Behavior

Significant (and linearly increasing with number of script files) page load times, i.e. ~7s per script file.

Originally created by @arthanson on GitHub (Oct 22, 2025). Originally assigned to: @jeremystretch on GitHub. ### NetBox Edition NetBox Community ### NetBox Version v4.4.4 ### Python Version 3.10 ### Steps to Reproduce In the `CustomStoragesLoader` class in exec_module it inits an instance of `storage` for every call to the function (for every script reference - even on a Script list view). In the case of storage backend like S3, this can add significant and linearly increasing overhead for every script file on the page. Note: Follow on to Issue #20574 ### Expected Behavior Constant (low) page load time on `/extras/scripts` ### Observed Behavior Significant (and linearly increasing with number of script files) page load times, i.e. ~7s per script file.
adam added the type: bugstatus: acceptednetboxseverity: low labels 2025-12-29 21:49:39 +01:00
adam closed this issue 2025-12-29 21:49:39 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11768