I'm fairly certain it is the SecureRandom seeding. Cyrpto requires strong random number generation. One of the techniques for this is to run an algorithm for a long time, producing an unpredictable number at the end. Solutions might be:
- find a way to do this "ahead of time", and that it only happens once.
- find a crypto implementation / JVM which has a different faster implementation.