Re: ERProfiling and Java 8
Re: ERProfiling and Java 8
- Subject: Re: ERProfiling and Java 8
- From: Paul Hoadley <email@hidden>
- Date: Mon, 04 Mar 2019 15:56:37 +1030
On 2 Mar 2019, at 19:58, Paul Hoadley <email@hidden> wrote:
> On 2 Mar 2019, at 17:20, Johann Werner <email@hidden
> <mailto:email@hidden>> wrote:
>
>> has been some time I used ERProfiling to hunt down bottlenecks. I just fired
>> up one project with it and it seems to work well. Only the activated heat
>> map seems to break some layout and marker elements show up that I can’t
>> remember of having seen in the past.
>>
>> But this is with Java 8 + Ant + Eclipse 2018-12 so no Maven.
>
> Thanks for looking at it Johann! If it works for you, I might persist.
Just in case anyone is following along at home, I have got this working again.
Recall that the symptom was that some pages would render the profile summary
bar alone: just a lone div was returned, no other page content. Working back
from here, I looked at the PFSummary delegate that generates that div.
PFSummary.responseEnded() takes a WOResponse, and calls appendContentString()
on it a bunch of times to add the trailing div. For reasons which are not clear
to me, the first call to appendContentString() would sometimes cause the
existing content to be dropped, leaving just the appended strings. (Either
that, or there's something else going on and it's a coincidence.)
So a workaround was to:
1. Save response.contentString().
2. Replace the calls to response.appendContentString() with append() calls to a
StringBuilder instead.
3. On the way out, concatenate the saved contentString and the result of
StringBuilder.toString(), and call response.setContent() with that string.
This certainly gets ERProfiling working on this project for me, though it's
unsatisfying.
--
Paul Hoadley
https://logicsquad.net/
https://www.linkedin.com/company/logic-squad/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden