Re: MYFACES-4244 Discussion

2018-07-12 Thread Leonardo Uribe
Hi

The consideration behind SharedStringBuilder is to keep a low memory
footprint, avoiding unnecessary object creation in situations where there
are lines of code that are called many times. It is not something to use
everywhere, only in very specific locations. The best garbage collector is
the one that is not called.

regards,

Leonardo Uribe

2018-07-12 8:27 GMT-05:00 Paul Nicolucci :

> I'll work to get that additional information.
>
> Also will look into using SharedStringBuilder.
>
> Thanks for the feedback.
>
> Regards,
>
> Paul
>
> [image: Inactive hide details for Thomas Andraschko ---07/12/2018 03:35:11
> AM---The SharedStringBuilder is only shared in the current r]Thomas
> Andraschko ---07/12/2018 03:35:11 AM---The SharedStringBuilder is only
> shared in the current request, so thats not a poblem.
>
> From: Thomas Andraschko 
> To: MyFaces Development 
> Date: 07/12/2018 03:35 AM
> Subject: Re: MYFACES-4244 Discussion
> --
>
>
>
> The SharedStringBuilder is only shared in the current request, so thats
> not a poblem.
> Take for example the #writeAttribute or #encodeAndWriteAttribute. I added
> a counter in #writeAttribute and even for a very small few, it's called
> about 2000 times.
> If you would also count the other instances, i'm sure there will be over
> 20.000 StringBuilder instances on normal views.
>
> See: *https://issues.apache.org/jira/browse/MYFACES-3130*
> <https://issues.apache.org/jira/browse/MYFACES-3130>
>
>
> I think we should check the "writer chain", whats exactly slow.
> The response should actually be buffered (javax.faces.FACELETS_BUFFER_SIZE
> ) and there should NOT be a big difference.
>
>
> For me a -1 without SharedStringBuilder and a -0.5 with
> SharedStringBuilder for now.
> We need to check the exact reason whats slow and also check the
> performance difference. Could you provide some numbers before and after
> this change only?
>
> I would also like to wait for other input from Leo or Gerhard.
>
>
>
> 2018-07-11 21:42 GMT+02:00 Paul Nicolucci <*pnico...@us.ibm.com*
> >:
>
>Hello all,
>
>I've made some performance improvements to MyFaces here:
>*https://issues.apache.org/jira/browse/MYFACES-4244*
><https://issues.apache.org/jira/browse/MYFACES-4244>
>
>I've put together a Pull Request here with the changes:
>*https://github.com/apache/myfaces/pull/10*
><https://github.com/apache/myfaces/pull/10>
>
>I know that Thomas had some concerns with using a StringBuilder here
>and I think I've addressed those concerns in the description of the JIRA
>issue.
>
>Doing some profiling of an application with some JSF in it we saw
>performance improvements with these changes and as a result I wanted to
>commit them.
>
>Please let me know if you have any questions or concerns.
>
>Thanks,
>
>Paul
>
>
>
>


Re: MYFACES-4244 Discussion

2018-07-12 Thread Paul Nicolucci

I'll work to get that additional information.

Also will look into using SharedStringBuilder.

Thanks for the feedback.

Regards,

Paul



From:   Thomas Andraschko 
To: MyFaces Development 
Date:   07/12/2018 03:35 AM
Subject:Re: MYFACES-4244 Discussion



The SharedStringBuilder is only shared in the current request, so thats not
a poblem.
Take for example the #writeAttribute or #encodeAndWriteAttribute. I added a
counter in #writeAttribute and even for a very small few, it's called about
2000 times.
If you would also count the other instances, i'm sure there will be over
20.000 StringBuilder instances on normal views.

See: https://issues.apache.org/jira/browse/MYFACES-3130


I think we should check the "writer chain", whats exactly slow.
The response should actually be buffered (javax.faces.FACELETS_BUFFER_SIZE
) and there should NOT be a big difference.


For me a -1 without SharedStringBuilder and a -0.5 with SharedStringBuilder
for now.
We need to check the exact reason whats slow and also check the performance
difference. Could you provide some numbers before and after this change
only?

I would also like to wait for other input from Leo or Gerhard.



2018-07-11 21:42 GMT+02:00 Paul Nicolucci :
  Hello all,

  I've made some performance improvements to MyFaces here:
  https://issues.apache.org/jira/browse/MYFACES-4244

  I've put together a Pull Request here with the changes:
  https://github.com/apache/myfaces/pull/10

  I know that Thomas had some concerns with using a StringBuilder here and
  I think I've addressed those concerns in the description of the JIRA
  issue.

  Doing some profiling of an application with some JSF in it we saw
  performance improvements with these changes and as a result I wanted to
  commit them.

  Please let me know if you have any questions or concerns.

  Thanks,

  Paul










Re: MYFACES-4244 Discussion

2018-07-12 Thread Thomas Andraschko
The SharedStringBuilder is only shared in the current request, so thats not
a poblem.
Take for example the #writeAttribute or #encodeAndWriteAttribute. I added a
counter in #writeAttribute and even for a very small few, it's called about
2000 times.
If you would also count the other instances, i'm sure there will be over
20.000 StringBuilder instances on normal views.

See: https://issues.apache.org/jira/browse/MYFACES-3130


I think we should check the "writer chain", whats exactly slow.
The response should actually be buffered (javax.faces.FACELETS_BUFFER_SIZE
) and there should NOT be a big difference.


For me a -1 without SharedStringBuilder and a -0.5 with SharedStringBuilder
for now.
We need to check the exact reason whats slow and also check the performance
difference. Could you provide some numbers before and after this change
only?

I would also like to wait for other input from Leo or Gerhard.



2018-07-11 21:42 GMT+02:00 Paul Nicolucci :

> Hello all,
>
> I've made some performance improvements to MyFaces here:
> https://issues.apache.org/jira/browse/MYFACES-4244
>
> I've put together a Pull Request here with the changes:
> https://github.com/apache/myfaces/pull/10
>
> I know that Thomas had some concerns with using a StringBuilder here and I
> think I've addressed those concerns in the description of the JIRA issue.
>
> Doing some profiling of an application with some JSF in it we saw
> performance improvements with these changes and as a result I wanted to
> commit them.
>
> Please let me know if you have any questions or concerns.
>
> Thanks,
>
> Paul
>


MYFACES-4244 Discussion

2018-07-11 Thread Paul Nicolucci

Hello all,

I've made some performance improvements to MyFaces here:
https://issues.apache.org/jira/browse/MYFACES-4244

I've put together a Pull Request here with the changes:
https://github.com/apache/myfaces/pull/10

I know that Thomas had some concerns with using a StringBuilder here and I
think I've addressed those concerns in the description of the JIRA issue.

Doing some profiling of an application with some JSF in it we saw
performance improvements with these changes and as a result I wanted to
commit them.

Please let me know if you have any questions or concerns.

Thanks,

Paul