Opened 18 years ago
Closed 18 years ago
#4441 closed (fixed)
minor regroup optimization
| Reported by: | (removed) | Owned by: | Adrian Holovaty |
|---|---|---|---|
| Component: | Template system | Version: | dev |
| Severity: | Keywords: | ||
| Cc: | Triage Stage: | Ready for checkin | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
For template tag such as
{% regroup records by category as categories %}
the internal lookup/rendering is implemented as a var resolve of 'var.category', with the calling context dropped; in other words, code is forcing an uneeded lookup for every iteration of regroup; following patch cuts out the uneeded 'var.' lookup.
Attachments (1)
Change History (3)
by , 18 years ago
| Attachment: | simplify-regroup.patch added |
|---|
comment:1 by , 18 years ago
| Triage Stage: | Unreviewed → Ready for checkin |
|---|
comment:2 by , 18 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
I can't see any problems with this, since you're correct that it doesn't reference the calling context, so name clashes aren't a problem.
I'll commit it tomorrow morning (too tired right now) if nobody beats me to it.