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 <[email protected]>:

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

Reply via email to