Opened 8 years ago

Closed 8 years ago

#4441 closed (fixed)

minor regroup optimization

Reported by: (removed) Owned by: adrian
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) 8 years ago.

Download all attachments as: .zip

Change History (3)

Changed 8 years ago by (removed)

comment:1 Changed 8 years ago by mtredinnick

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Ready 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 8 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

(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