Skip to content

Init storage at BaseScript level instead of within findstorage #20574

@bctiemann

Description

@bctiemann

NetBox Edition

NetBox Community

NetBox Version

v4.4.2

Python Version

3.10

Steps to Reproduce

In the BaseStorage class, the findstorage function inits an instance of storage for every call of the function (i.e. for every script). In the case of storage backends like S3, this can add significant and linearly increasing overhead time for every script file on the page.

Expected Behavior

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

Observed Behavior

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

Metadata

Metadata

Assignees

Labels

severity: 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

Relationships

None yet

Development

No branches or pull requests

Issue actions