Script list is slow when having large script files/a lot of scripts #6240

Closed
opened 2025-12-29 19:38:24 +01:00 by adam · 0 comments
Owner

Originally created by @kkthxbye-code on GitHub (Mar 21, 2022).

Originally assigned to: @kkthxbye-code on GitHub.

NetBox version

v3.1.9

Python version

3.9

Steps to Reproduce

  1. Create script file with following content in the script directory (test1.py): content
  2. Duplicate it a bunch of times: for i in {2..20}; do cp test1.py "test$i.py"; done
  3. Open the script list view - /extras/scripts/

Expected Behavior

Load times should not be multiple seconds

Observed Behavior

On my i7 9700 the load times are roughly 2.3 seconds for the above example. On our production server (weaker single core performance) the performance impact is larger.

I have implemented a fix (https://github.com/netbox-community/netbox/pull/8925) which reduces the load time for the reproduction example from ~2300 ms to ~160 ms.

Originally created by @kkthxbye-code on GitHub (Mar 21, 2022). Originally assigned to: @kkthxbye-code on GitHub. ### NetBox version v3.1.9 ### Python version 3.9 ### Steps to Reproduce 1. Create script file with following content in the script directory (test1.py): [content](https://gist.github.com/kkthxbye-code/75aa97e2fc5506da999bb6b01b3c1ed8) 2. Duplicate it a bunch of times: `for i in {2..20}; do cp test1.py "test$i.py"; done` 3. Open the script list view - `/extras/scripts/` ### Expected Behavior Load times should not be multiple seconds ### Observed Behavior On my i7 9700 the load times are roughly 2.3 seconds for the above example. On our production server (weaker single core performance) the performance impact is larger. I have implemented a fix (https://github.com/netbox-community/netbox/pull/8925) which reduces the load time for the reproduction example from ~2300 ms to ~160 ms.
adam added the type: bugstatus: accepted labels 2025-12-29 19:38:24 +01:00
adam closed this issue 2025-12-29 19:38:24 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6240