[
https://issues.apache.org/jira/browse/NIFI-1460?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15130236#comment-15130236
]
ASF GitHub Bot commented on NIFI-1460:
--------------------------------------
Github user PuspenduBanerjee commented on the pull request:
https://github.com/apache/nifi/pull/202#issuecomment-179166551
@trkurc I think, if UUID format is of concern the following piece will run
more than 2 times faster compared to `UUID(0,long)`, could you please re-verify:
```java
private static String createFakeUUIDString(final AtomicLong atomicLong){
final String s=Long.toHexString(atomicLong.incrementAndGet());
return new StringBuffer("00000000-0000-0000-0000000000000000"
.substring(0,(35-s.length()))+s)
.insert(23, '-').toString();
}
```
I hope, everyone wins that way too along with more performance benefit.
> Test Performance improvement. Test Timeout Mitigation.
> ------------------------------------------------------
>
> Key: NIFI-1460
> URL: https://issues.apache.org/jira/browse/NIFI-1460
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Core Framework, Tools and Build
> Affects Versions: 0.4.1
> Environment: linux, unix with true random number generator.
> Reporter: Puspendu Banerjee
> Priority: Minor
> Labels: performance
> Fix For: 0.5.0
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> Existing test case
> nifi-framework-core/src/test/java/org/apache/nifi/controller/TestStandardFlowFileQueue.java
> uses a huge number of call to UUID.randomUUID() which is very slow in linux
> , unix environment if there is not much activity [ like mouse move etc.] .In
> addition to that UUID.randomUUID() depends on /dev/(u)random to get a random
> number, such system call costs IO and /dev/random is bandwidth/rate limited
> which again slows down overall performance.
> Workaround is rngd daemon(ref: http://linux.die.net/man/8/rngd)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)