Opened 11 years ago

Closed 11 years ago

#4441 closed (fixed)

minor regroup optimization

Reported by: (removed) Owned by: Adrian Holovaty
Component: Template system Version: master
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


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) 11 years ago.

Download all attachments as: .zip

Change History (3)

Changed 11 years ago by (removed)

Attachment: simplify-regroup.patch added

comment:1 Changed 11 years ago by Malcolm Tredinnick

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 Changed 11 years ago by Adrian Holovaty

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