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

GenerateSchemaCreationScript creates many identical dialect instances #3397

Closed
AlexanderKot opened this issue Aug 5, 2023 · 4 comments · Fixed by #3398
Closed

GenerateSchemaCreationScript creates many identical dialect instances #3397

AlexanderKot opened this issue Aug 5, 2023 · 4 comments · Fixed by #3398

Comments

@AlexanderKot
Copy link

Hello
During generation script for DB creation Nhib 5.4.4 creates dialect instances many times.

image

It looses passed dialect instance in GetDialectTypeName calling GetSqlTypeCode

GetSqlTypeCode do not take dialect as param....

It creates slowdown and memory traffic.

@bahusoid
Copy link
Member

bahusoid commented Aug 5, 2023

Looks related to #1950

@hazzik
Copy link
Member

hazzik commented Aug 6, 2023

It is likely a regression from #703

@fredericDelaporte fredericDelaporte changed the title GenerateSchemaCreationScript creates dialect instances (huge amount) instead of reusing passed instance GenerateSchemaCreationScript creates many identical dialect instances Aug 6, 2023
@fredericDelaporte fredericDelaporte added this to the 5.3.19 milestone Aug 8, 2023
bahusoid added a commit that referenced this issue Aug 12, 2023
Wrap mapping usages in StaticDialectMappingWrapper

Fixes #3397
@fredericDelaporte
Copy link
Member

Fixed by #3399.

@AlexanderKot
Copy link
Author

Thank you everybody
Profiling of the same method call on Nhib 5.4.5 - problem solved.
It is taken on ~3 time more powerful PC, so it cannot be directly compared.

image

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

Successfully merging a pull request may close this issue.

4 participants