You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Tony Poppleton (JIRA)" <ji...@apache.org> on 2010/01/16 02:48:54 UTC
[jira] Created: (HTTPCLIENT-907) Investigate implementation of
expand() method in CharArrayBuffer
Investigate implementation of expand() method in CharArrayBuffer
----------------------------------------------------------------
Key: HTTPCLIENT-907
URL: https://issues.apache.org/jira/browse/HTTPCLIENT-907
Project: HttpComponents HttpClient
Issue Type: Task
Reporter: Tony Poppleton
Priority: Minor
The CharArrayBuffer expand() method will sometimes double the size of the buffer array.
However looking at the source code for ArrayList in the Java utils package reveals that they do:
int newCapacity = (oldCapacity * 3)/2 + 1;
Would this be more efficient in CharArrayBuffer (in practice)?
The standard benchmarks should be run to ascertain if this is the case.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org
[jira] Resolved: (HTTPCORE-214) Investigate implementation of
expand() method in CharArrayBuffer
Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HTTPCORE-214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Oleg Kalnichevski resolved HTTPCORE-214.
----------------------------------------
Resolution: Won't Fix
Fix Version/s: (was: 4.1-beta1)
I am not seeing any measurable impact on performance by this change. Besides, StringBuilder also simply doubles the internal buffer on expansion.
Closing as WONTFIX
Oleg
> Investigate implementation of expand() method in CharArrayBuffer
> ----------------------------------------------------------------
>
> Key: HTTPCORE-214
> URL: https://issues.apache.org/jira/browse/HTTPCORE-214
> Project: HttpComponents HttpCore
> Issue Type: Task
> Reporter: Tony Poppleton
> Priority: Minor
>
> The CharArrayBuffer expand() method will sometimes double the size of the buffer array.
> However looking at the source code for ArrayList in the Java utils package reveals that they do:
> int newCapacity = (oldCapacity * 3)/2 + 1;
> Would this be more efficient in CharArrayBuffer (in practice)?
> The standard benchmarks should be run to ascertain if this is the case.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org
[jira] Moved: (HTTPCORE-214) Investigate implementation of expand()
method in CharArrayBuffer
Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HTTPCORE-214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Oleg Kalnichevski moved HTTPCLIENT-907 to HTTPCORE-214:
-------------------------------------------------------
Key: HTTPCORE-214 (was: HTTPCLIENT-907)
Project: HttpComponents HttpCore (was: HttpComponents HttpClient)
> Investigate implementation of expand() method in CharArrayBuffer
> ----------------------------------------------------------------
>
> Key: HTTPCORE-214
> URL: https://issues.apache.org/jira/browse/HTTPCORE-214
> Project: HttpComponents HttpCore
> Issue Type: Task
> Reporter: Tony Poppleton
> Priority: Minor
>
> The CharArrayBuffer expand() method will sometimes double the size of the buffer array.
> However looking at the source code for ArrayList in the Java utils package reveals that they do:
> int newCapacity = (oldCapacity * 3)/2 + 1;
> Would this be more efficient in CharArrayBuffer (in practice)?
> The standard benchmarks should be run to ascertain if this is the case.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org