Re: Patch for reducing locking on the class cache

Johno Crawford <[email protected]>
Newsgroups gmane.comp.web.freemarker.devel
Message-ID <[email protected]>
On 5/04/2012 11:50 AM, Daniel Dekany wrote:
> Thursday, April 5, 2012, 11:45:01 AM, Daniel Dekany wrote:
>
>> Wednesday, April 4, 2012, 11:43:55 AM, Johno Crawford wrote:
>>
>>> Hi!
>>>
>>> Whilst profiling one of our webapps I noticed some hotspots in
>>> FreeMarker. After some digging I noticed the classes had been patched in
>>> FreeMarker 3.0.. however that branch is now abandoned. I have created a
>>> patch for 2.3.x which is basically a backport of Attila's original
>>> changes available @
>>> https://sourceforge.net/tracker/?func=detail&aid=3514821&group_id=794&atid=300794
>>> . If there is anything else needed from me to get this patch accepted,
>>> please let me know.
>> There are two things regarding this:
>>
>> - The change should be 100% backward-compatible to make it into 2.3.x,
>>    and pretty much 100% to make it into 2.4.x. I haven't looked yet...
>>    is it B.C.?
> For startes it uses ConcurrentHashMap (which is only there since Java
> 1.5). That's OK in 2.4, but 2.3.x unfortunately must be able to run on
> the 1.2 API-s.

Why must 2.3.x run on the 1.2 APIs? Surely if developers are updating to 
the latest FreeMarker 2.3.x they should seriously consider updating Java 
too (exploits etc.). J2SE 1.2 is over 10 years old, surely past its EOL. 
Statowl also shows Java versions < 1.5 usage under 1% [1]. Perhaps there 
is some other important reason I have overlooked.

>
>> - In principle you should send a signed CLA with traditional mail (I
>>    will send the form to you now) or else we can't accept the patch.
>>    OTOH its not a lot of changes, and the source is Attila's work
>>    anyway, so the CLA looks like an overkill... Maybe the simplest is
>>    if Attila or me does that, strictly without looking at your patch. ;)
>>    However, once you sent the CLA, you can send more patches without
>>    obstacles, so consider that.
>>
>>> Cheers,
>>>
>>> J

[1] http://www.statowl.com/java.php

------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.