Bug 42405 - LdapExtSampler.sample use StringBuilder instead of String1 + String2
Summary: LdapExtSampler.sample use StringBuilder instead of String1 + String2
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: unspecified
Hardware: All All
: P3 enhancement with 1 vote (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
Keywords: PatchAvailable
Depends on:
Reported: 2007-05-14 02:33 UTC by Fabian Bieker
Modified: 2007-06-05 04:17 UTC (History)
0 users

makes LdapExtSampler.sample use a StringBuilder (11.20 KB, patch)
2007-05-14 02:35 UTC, Fabian Bieker
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Bieker 2007-05-14 02:33:28 UTC
LdapExtSampler.sample(...) uses a lot of "String1" + "String2" to generate a
message for the SamplerResult's responseData.
Imho using a StringBuilder is faster and less memory intensive.

I wrote a patch to make LdapExtSampler.sample(...) use a StringBuilder.
Running JMeter in a profiler shows that the patched LdapExtSampler performs
better. The performance increase is not that big, but I think it is worth it.

The functionalty of the sampler is not changed, imho.

The patch is against revision 537585 of the jmeter svn trunk. If there is a
problem with the patch or the patch format feel free to contact me.
Comment 1 Fabian Bieker 2007-05-14 02:35:01 UTC
Created attachment 20189 [details]
makes LdapExtSampler.sample use a StringBuilder
Comment 2 Sebb 2007-05-14 05:12:31 UTC
Thanks, but I think this has already been addressed in the current code.

Note that JMeter trunk is rather old (and was not used to create the current 
version 2.2) - see the STATUS file.

Current development is taking place in the rel-2-2 branch.

Sorry if you have wasted any time on this.
Comment 3 Fabian Bieker 2007-05-14 07:20:03 UTC
No Problem, did not spend much time to create the patch...

But maybe you should update http://jakarta.apache.org/site/cvsindex.html
wich points to http://svn.apache.org/repos/asf/jakarta/jmeter/trunk/ .
Comment 4 Sebb 2007-06-05 04:17:38 UTC