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

MigrationVersion compareTo is very slow #563

Closed
pwielgolaski opened this issue Jul 24, 2013 · 1 comment
Closed

MigrationVersion compareTo is very slow #563

pwielgolaski opened this issue Jul 24, 2013 · 1 comment

Comments

@pwielgolaski
Copy link
Contributor

@pwielgolaski pwielgolaski commented Jul 24, 2013

I noticed during profiling our app that migration takes(4s - 4 migrations) quite long and after tracking down I noticed that implementation of MigrationVersion is quite ineffective as it don't cache pattern and use patterns to parse string every time compareTo is called, which is often as you put and get it from Map.

@axelfontaine
Copy link
Contributor

@axelfontaine axelfontaine commented Jul 25, 2013

Thanks for submitting the issue and the changes.
I don't know why you are seeing these numbers, but I strongly believe the problem must be somewhere else.

I've merged your pull request anyway as the implementation is simpler than the current one now that alphanumeric versions are no longer allowed (they were in Flyway 1.x)

I've also added you to the hall of fame: http://flywaydb.org/contribute/hallOfFame.html

Cheers
Axel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.