Opened 16 years ago

Closed 13 years ago

#9102 closed Cleanup/optimization (duplicate)

admin Filter Box redraws each time it's changed

Reported by: David Cramer Owned by: David Cramer
Component: contrib.admin Version: 1.0
Severity: Normal Keywords: admin
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The filter box in django.contrib.admin redraws itself completely anytime its filtered, added from, or removed from. This causes severe slowdowns when there are a lot of items being displayed.

Attachments (1)

efficient-filters.diff (6.3 KB ) - added by David Cramer 16 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 by David Cramer, 16 years ago

I should have a patch for this tonight. I've changed the select box code to work as follows:

  • The "cache" is just a key/ref pointer for option.value->option.
  • Each filter box contains a full list of every option.
  • Options are shown/hidden if based on if they're active.

comment:2 by David Cramer, 16 years ago

Summary: admin Filter Box redraws each it's changedadmin Filter Box redraws each time it's changed

comment:3 by Adrian Holovaty, 16 years ago

Triage Stage: UnreviewedAccepted

Good improvement. I look forward to the patch!

comment:4 by Adrian Holovaty, 16 years ago

Component: Contrib appsdjango.contrib.admin

comment:5 by David Cramer, 16 years ago

Owner: changed from nobody to David Cramer
Status: newassigned

by David Cramer, 16 years ago

Attachment: efficient-filters.diff added

comment:6 by David Cramer, 16 years ago

I removed the sort method (it's complicated to convert) because it was not in use anymore. If this is an issue I'll write a new sort method.

comment:7 by David Cramer, 16 years ago

Has patch: set

comment:8 by David Cramer, 16 years ago

The patch above is not fully working. It's just the JavaScript optimizations. I'll submit a full patch tonight.

comment:9 by Matthias Kestenholz, 14 years ago

Related ticket: #3202[patch] Faster SelectBox for ManyToMany

The patch on this ticket looks more thorough, but it does not seem to be worked on anymore?

comment:10 by Luke Plant, 14 years ago

Severity: Normal
Type: Cleanup/optimization

comment:11 by Julien Phalip, 13 years ago

Easy pickings: unset
Resolution: duplicate
Status: assignedclosed
UI/UX: unset

Yes, this is essentially a duplicate of #3202.

Note: See TracTickets for help on using tickets.
Back to Top