History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: GRAILS-1025
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Marc Palmer
Reporter: Marc Palmer
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Grails

Codecs perform badly because of lookups for codec class + method

Created: 05/Apr/07 09:29 AM   Updated: 06/Apr/07 03:09 PM
Component/s: None
Affects Version/s: 0.4.2
Fix Version/s: 0.5-RC1

Time Tracking:
Not Specified

File Attachments: 1. File CodecsGrailsPlugin.groovy (3 kb)



 Description  « Hide
The codecs plugin impl looks up codec classes for every call even though in non-development environments there is no need.

Fix attached. NOTE fix is for version 0.4.2 please diff with 0.5 and merge.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Marc Palmer - 05/Apr/07 09:45 AM
This can give big performance improvements, depending on the relative load of tags in the page. i.e. if you have a lot of link tags that need to encodeAsURL etc, but not many other tags like g:select, you can see a bit performance increase.

i.e. the effect here is small compared to taglib performance issues, but significant enough.


Jeff Brown - 05/Apr/07 10:26 AM
I am surprised that the effect is significant. I think the call to getCodecClass() involves a simple lookup in a Map.

Marc Palmer - 05/Apr/07 11:02 AM
Yes, well it appears to be, and will only be worse in 0.5 (slightly) as of the artefact abstraction.

In a navigation system, repeated in images and text, we can have a lot of these, so we can easily have 50+ calls per page. Multiply this by concurrent requests and it becomes a little more significant.