Skip to content

CustomStoragesLoader creates storage on every exec_module #20660

@arthanson

Description

@arthanson

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.

Metadata

Metadata

Assignees

Labels

netboxseverity: lowDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions