Costin Manolache wrote:
Yes, this could be refactored later.Remy Maucherat wrote:Hi, In order to fix some GC problems in StandardPipeline and StandardWrapper, where they allocate some context objects (for the first, it means 3 objects / request, for the second, one complex object / request), I need to add methods to the Request interface: - get/setFilterChain - get/setValveContext This ties the contexts to the Request, which itself is thread safe, so the objects can be reused. It will not break compatibility with any existing module. This removes two hotspots, as well as improves GC :) When the security manager is enabled, the filter chain will not be reused, to prevent possible exploits. IMO, this change should not be ported to the 4.1.x branch. Comments ?
+1
Maybe using something similar with the "Notes" would help ? The cost is very small ( array access versus field access ),
and it can be used for anything.
The current notes are recycled per request - that's why
I said 'simiar', like 'permanentNotes".
However, since we would want to keep compatibility with the old 4.x modules (realms, valves, etc, etc), we are bound to have the Request interface look bad (and some modules will bypass it to access the optimized buffers instead of dealing with Strings).
Remy
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>