[PR #7933] [MERGED] Fix #7932: Improve performance of the quick filter #13303

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/7933
Author: @kkthxbye-code
Created: 11/25/2021
Status: Merged
Merged: 11/30/2021
Merged by: @thatmattlove

Base: developHead: fast-filter


📝 Commits (1)

  • a0b9ac7 UI: Improve performance of the quick filter

📊 Changes

3 files changed (+18 additions, -8 deletions)

View changed files

📝 netbox/project-static/dist/netbox.js (+1 -1)
📝 netbox/project-static/dist/netbox.js.map (+1 -1)
📝 netbox/project-static/src/search.ts (+16 -6)

📄 Description

Fixes: #7932

Instead of querying the DOM and modifying it in the same loop, maintain a list of matched rows and apply the css classes afterwards.

Before the fix filtering 1000 elements took 22 seconds. After the fix the same query took around 200 ms.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/7933 **Author:** [@kkthxbye-code](https://github.com/kkthxbye-code) **Created:** 11/25/2021 **Status:** ✅ Merged **Merged:** 11/30/2021 **Merged by:** [@thatmattlove](https://github.com/thatmattlove) **Base:** `develop` ← **Head:** `fast-filter` --- ### 📝 Commits (1) - [`a0b9ac7`](https://github.com/netbox-community/netbox/commit/a0b9ac7bcc195a5cd8e5577a0dff16cb51d9775f) UI: Improve performance of the quick filter ### 📊 Changes **3 files changed** (+18 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `netbox/project-static/dist/netbox.js` (+1 -1) 📝 `netbox/project-static/dist/netbox.js.map` (+1 -1) 📝 `netbox/project-static/src/search.ts` (+16 -6) </details> ### 📄 Description ### Fixes: #7932 Instead of querying the DOM and modifying it in the same loop, maintain a list of matched rows and apply the css classes afterwards. Before the fix filtering 1000 elements took 22 seconds. After the fix the same query took around 200 ms. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 22:26:38 +01:00
adam closed this issue 2025-12-29 22:26: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#13303