Closed enkelmedia closed 3 years ago
Hey @enkelmedia!
Thanks for your interest in SuperValueConverters! š
Your question about DB hits is a valid one... Iām not entirely sure if the DataTypeService has a cache, but I presume it still hits the DB directly.
Prevalues are only fetched when the GetPropertyValueType
is called in order to evaluate what type to return - this is called on app start or when Models Builder regenerates - and so there are no database hits when simply āconvertingā a value. Given the (usually) relatively small number of data types and properties in a site I donāt expect this bottleneck to be too big...
That said, thereās probably a bit of caching that could be added to avoid duplicate lookups - I need to do this for the type finder code too. Iāve put a card into my next āreleaseā to investigate this: https://github.com/callumbwhyte/super-value-converters/projects/1#card-17320166
Let me know if you have any questions or feedback once you give the package a try! š
Cheers, Callum
Closing this as it's no longer relevant in Umbraco 8.
Hi man!
Great project! I've found my self getting annoyed by this many times but never got the idea to sit down and create something to "get around" it. So I love the initiative!
Without having tested this, I just have one question, in the converters you are using the DataTypeHelper which uses the DataTypeService "under the hoods". Do you know if this is hitting the database to fetch the prevalues? I know that is used to do but maybe there has been a cache added or something? If it's hitting the database this will be quite a performance bottleneck.
Example: https://github.com/callumbwhyte/super-value-converters/blob/dev/src/Our.Umbraco.SuperValueConverters/Helpers/DataTypeHelper.cs
I really look forward to try this out!
All the best!