Patch for reducing locking on the class cache

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Patch for reducing locking on the class cache

Johno Crawford
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.

Cheers,

J

------------------------------------------------------------------------------
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
_______________________________________________
FreeMarker-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freemarker-devel
Reply | Threaded
Open this post in threaded view
|

Re: Patch for reducing locking on the class cache

Daniel Dekany
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.?

- 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

--
Best regards,
 Daniel Dekany


------------------------------------------------------------------------------
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
_______________________________________________
FreeMarker-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freemarker-devel
Reply | Threaded
Open this post in threaded view
|

Re: Patch for reducing locking on the class cache

Daniel Dekany
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.

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

--
Best regards,
 Daniel Dekany


------------------------------------------------------------------------------
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
_______________________________________________
FreeMarker-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freemarker-devel
Reply | Threaded
Open this post in threaded view
|

Re: Patch for reducing locking on the class cache

Daniel Dekany
Thursday, April 5, 2012, 11:50:04 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.

But of course, detecting the presence of the class dynamically is not
out of the question... FM already does such things at some places (JSP
support, Jython support).

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

--
Best regards,
 Daniel Dekany


------------------------------------------------------------------------------
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
_______________________________________________
FreeMarker-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freemarker-devel
Reply | Threaded
Open this post in threaded view
|

Re: Patch for reducing locking on the class cache

Johno Crawford
In reply to this post by Daniel Dekany
On 5/04/2012 11:45 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.?

There are currently two patches, one which should apply fine to 2.3.x
which is attached to SF ticket, and the other patch for 2.4.x is a
github pull request. Only real differences between the two is one uses
generics.

>
> - 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.

Sure, please send it on through.

>
>> Cheers,
>>
>> J

------------------------------------------------------------------------------
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
_______________________________________________
FreeMarker-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freemarker-devel
Reply | Threaded
Open this post in threaded view
|

Re: Patch for reducing locking on the class cache

Johno Crawford
In reply to this post by Daniel Dekany
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
_______________________________________________
FreeMarker-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freemarker-devel