Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CnameGenerator takes too much time during class loading #235

Closed
hrosa opened this issue Aug 17, 2016 · 1 comment
Closed

CnameGenerator takes too much time during class loading #235

hrosa opened this issue Aug 17, 2016 · 1 comment
Assignees
Milestone

Comments

@hrosa
Copy link
Contributor

hrosa commented Aug 17, 2016

The Base64 conversion in CnameGenerator can take up to 230ms during class loading.
Replace for the faster DatatypeConverter.

@hrosa hrosa added this to the 6.0.0 milestone Aug 17, 2016
@hrosa hrosa self-assigned this Aug 17, 2016
hrosa added a commit that referenced this issue Aug 17, 2016
…ding time reduced from 200ms to 10ms during local tests.

Wrote concurrent test case for CnameGenerator.
@hrosa
Copy link
Contributor Author

hrosa commented Aug 17, 2016

Class loading times reduced from 200ms to ~10ms during local tests

2016-08-17 18:06:28,488 INFO [org.mobicents.media.server.impl.rtp.CnameGeneratorTest] worker-2 took 8ms to generate the cname qUJ7OOdmOTBCHZZl
2016-08-17 18:06:28,488 INFO [org.mobicents.media.server.impl.rtp.CnameGeneratorTest] worker-1 took 8ms to generate the cname kaGBlQ24Rc4vddvx
2016-08-17 18:06:28,488 INFO [org.mobicents.media.server.impl.rtp.CnameGeneratorTest] worker-3 took 8ms to generate the cname nM/6M2anJXrOpIMK
2016-08-17 18:06:28,660 INFO [org.mobicents.media.server.impl.rtp.CnameGeneratorTest] worker-3 took 1ms to generate the cname oyW/25hhc0iqjQHw
2016-08-17 18:06:28,660 INFO [org.mobicents.media.server.impl.rtp.CnameGeneratorTest] worker-1 took 1ms to generate the cname j4dZPE5N/n9GrFbG
2016-08-17 18:06:28,660 INFO [org.mobicents.media.server.impl.rtp.CnameGeneratorTest] worker-3 took 0ms to generate the cname j1oMsAakVBCMnCnn
2016-08-17 18:06:28,660 INFO [org.mobicents.media.server.impl.rtp.CnameGeneratorTest] worker-2 took 1ms to generate the cname hOCV17GQv8uR6B7o
2016-08-17 18:06:28,660 INFO [org.mobicents.media.server.impl.rtp.CnameGeneratorTest] worker-3 took 0ms to generate the cname jHxR5E+HyAWManE0
2016-08-17 18:06:28,660 INFO [org.mobicents.media.server.impl.rtp.CnameGeneratorTest] worker-1 took 0ms to generate the cname hyt6iiB6ldXmeNGu
2016-08-17 18:06:28,660 INFO [org.mobicents.media.server.impl.rtp.CnameGeneratorTest] worker-2 took 0ms to generate the cname n0OgCvtWvp5jTPQB
2016-08-17 18:06:28,660 INFO [org.mobicents.media.server.impl.rtp.CnameGeneratorTest] worker-3 took 0ms to generate the cname pTyP1TnAI4Hsu1Co
2016-08-17 18:06:28,660 INFO [org.mobicents.media.server.impl.rtp.CnameGeneratorTest] worker-2 took 0ms to generate the cname tTV9GlReB70AKN1Y
2016-08-17 18:06:28,660 INFO [org.mobicents.media.server.impl.rtp.CnameGeneratorTest] worker-1 took 0ms to generate the cname jBMpRqpY3hQurF1V
... and so on

hrosa added a commit that referenced this issue Aug 17, 2016
…sects the each thread results to check uniqueness in a generic way.
@hrosa hrosa closed this as completed in be49743 Aug 18, 2016
@hrosa hrosa modified the milestones: 6.0.0, 5.1.0 Sep 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant