Code

Opened 7 years ago

Closed 7 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:

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

Download all attachments as: .zip

Change History (3)

Changed 7 years ago by (removed)

comment:1 Changed 7 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 7 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@…

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.