bamaer commented on PR #8705:
URL: https://github.com/apache/hop/pull/8705#issuecomment-5911133642
**Should fix**
- **Unseeded random values are now much slower** (`RandomValue.java:281`).
Without a seed, `data.randomGenerator` is now a `SecureRandom`, and it's called
for every row for the number, integer and string types. On Linux the default
`SecureRandom` (NativePRNG) is 15x slower than `Random` on one thread. With
several transform copies it gets worse, because they all wait on one shared
lock: 5M `nextDouble()` per thread took 85 ms with `Random` and 9.6 s with
`SecureRandom` on 4 threads. This transform is mostly used to generate test
data, so it doesn't need secure random numbers. Suggested fix: keep `new
Random()` and add `@SuppressWarnings("java:S2245")`, as the seeded branch
already does.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]