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)

simplify-regroup.patch (1016 bytes ) - added by (removed) 18 years ago.

Download all attachments as: .zip

Change History (3)

by (removed), 18 years ago

Attachment: simplify-regroup.patch added

comment:1 by Malcolm Tredinnick, 18 years ago

Triage Stage: UnreviewedReady for checkin

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.

comment:2 by Adrian Holovaty, 18 years ago

Resolution: fixed
Status: newclosed

(In [5392]) Fixed #4441 -- Made a small optimization to the regroup template tag implementation. Thanks, ferringb@…

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