Edgewall Software
Modify

Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#7842 closed enhancement (fixed)

[patch] Allow manage genshi.max_cache_size from ini file

Reported by: catalin.balan@… Owned by: catalin.balan@…
Priority: normal Milestone: 0.12
Component: rendering Version: 0.12dev
Severity: normal Keywords: genshi max_cache_size template loader cache
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

For custom templates, increasing the genshi's cache size improves performance.

From genshi docs:

...
The maximum number of templates that the template loader will cache in memory. 
The default value is 25. 
You may want to choose a higher value if your web site uses a larger number of templates, 
and you have enough memory to spare.
...

Thank you, Catalin Balan

Attachments (2)

trac-max_cache_size.diff (1.2 KB ) - added by catalin.balan@… 13 years ago.
trac-max_cache_size.2.diff (1.2 KB ) - added by catalin.balan@… 13 years ago.

Download all attachments as: .zip

Change History (8)

by catalin.balan@…, 13 years ago

Attachment: trac-max_cache_size.diff added

comment:1 by Christian Boos, 13 years ago

Milestone: 0.12

Though we already use [trac] auto_reload when actually speaking about templates, I think [trac] max_cache_size is too imprecise, we should rather have simply [trac] genshi_cache_size.

Also, could you please follow the TracDev/CodingStyle next time? (esp. wrapping lines at 79 chars).

in reply to:  1 comment:2 by anonymous, 13 years ago

Replying to cboos:

Though we already use [trac] auto_reload when actually speaking about templates, I think [trac] max_cache_size is too imprecise, we should rather have simply [trac] genshi_cache_size.

Also, could you please follow the TracDev/CodingStyle next time? (esp. wrapping lines at 79 chars).

Sorry about 79 lines stuff.

In place of genshi_cache_size, I would rather have genshi.max_cache_size, genshi.auto_reaload and so on.

Thank you, Catalin Balan

comment:3 by catalin.balan@…, 13 years ago

Keywords: cache added

Maybe a dedicated section in config.

[genshi]
max_cache_size = 25
auto_reload = True

Thank you, Catalin Balan

by catalin.balan@…, 13 years ago

Attachment: trac-max_cache_size.2.diff added

comment:4 by Remy Blank, 12 years ago

Owner: set to Remy Blank

comment:5 by Remy Blank, 12 years ago

Resolution: fixed
Status: newclosed

Patch applied in [8723], using [trac] genshi_cache_size as suggested in comment:1.

Incidentally, I noticed that auto_reload is an Option and not a BoolOption. With a default-generated trac.ini, the option is set to auto_reload = False, resulting in auto_reload = u'False' which evaluates as True… So it seems we have had auto-reloading active by default for a long time. I'll fix that in 0.11-stable and make a note on #7490 (even though it probably has only minimal impact).

comment:6 by Remy Blank, 12 years ago

Owner: changed from Remy Blank to catalin.balan@…

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain catalin.balan@….
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from catalin.balan@… to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.