-
-
Notifications
You must be signed in to change notification settings - Fork 346
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
MVCNameCase improvements #437
MVCNameCase improvements #437
Conversation
I did a quick test and behaved well. But I can put together a test with a large serialization list to find out how it will perform. |
OK, good.. and it should be compared to the previous version.
DT
Il giorno ven 16 ott 2020 alle ore 19:22 João Antônio Duarte <
notifications@github.com> ha scritto:
… Did you measured the timing of this new version?
I did a quick test and behaved well. But I can put together a test with a
large serialization list to find out how it will perform.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#437 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAK4ZJEF2RJSVC433Y6TGE3SLB6ONANCNFSM4SSVXSMA>
.
--
*Daniele Teti*
CEO & CTO
bit Time Professionals
website [it]: www.bittimeprofessionals.it
website [en]: www.bittimeprofessionals.com
blog: www.danieleteti.it
my last book on leanpub <https://leanpub.com/delphimvcframework>
my previous books on amazon
<https://www.amazon.it/s?i=stripbooks&rh=p_27%3ADaniele+Teti>
mobile: +39 3496626822
office: +39 06 20761499
|
…regex, serialization becomes 6 times slower.
I did a serialization test with an extensive list. I found that using the SnakeCase function with regular expression is about 6 times slower. So, I improved the existing SnakeCase function to convert multiple underscores into just one and also add an underscore between word and numeral.
|
When improving unit tests I identified the error described in issue #436 and made the correction. |
Good! Thank you Joao. RegEx are powerful but quite slow compared in these cases. |
I added a new type of name case serialization:
ncSnakeCase
I saw that there was already a conversion function for the snake case, however it failed to convert multiple underscores to just one. So I switched to regular expression conversion.