jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ham1 <>
Subject [GitHub] jmeter issue #257: Static Analysis Fixes
Date Wed, 25 Jan 2017 22:38:53 GMT
Github user ham1 commented on the issue:
    Thanks for looking at the PR and commenting.
    I will take another look at the changes to `org.apache.jmeter.control` and either revert
or justify them.
    I'd gladly add more tests if we move to Spock ;)
    The reason for replacing `StringBuilder` with `+` is for **readability**.
    That article shows, that for the simple code i.e. not building a string inside loops etc.
they are the same i.e. the JVM generates a `StringBuilder` for the simple `+` code.
    I believe they have the same performance but for me reading:
    `"nodeList[" + i + "] " + nodeList.item(i)`
    is much easier than:
    `new StringBuilder("nodeList[").append(i).append("] ").append(nodeList.item(i)).toString()`
    `"Row: " + row`
    much easier than:
    `new StringBuilder("Row: ").append(row).toString()`
    My change in `InfluxdbBackendListenerClient` might be a tiny bit slower due to the initial
capacity that the JVM might use the default of 16 causing some resizing of buffers.
    Hope that makes sense.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message