-
-
Notifications
You must be signed in to change notification settings - Fork 533
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
Extract hex digits cache regex #3140
Conversation
…previous version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
When changing the theme it feels faster now. Maybe it is subjective I don't know.
Regarding the use of Span. I thought so too already, but I don't have a clear use-case for it. If you want to make use of it just create a new ticket for later,
I felt like it was faster too haha but I didn't bother to go compare both versions side by side haha. I think every internal string manipulation can use it. You have some substringing in the theme generator for example. It should be a bit faster and without allocations, we'll do it once we clear up out the big stuff in the release. |
* Extract hex digits cache regex (#3140) * Start With Benchmark * Add ThemeGenerator for baseline benchmark * ExtractHexDigits cache REGEX * Methods Benchmarked + Tests * Theme Generator : Refactor ExtractHexDigits * Add test making sure ThemeGenerator is still logically equivalent to previous version. * Run format * Rename IsHexDigit Co-authored-by: Mladen Macanovic <[email protected]> * Fix Table THead Query Selector to target only first THead for FixedHeader and Resize features. (#3155) * Support types without object equal operator ( extend test for DateTime, TimeSpan ) (#3152) * Add test for DateTime and TimeSpan ~ set CultureInfo on test start + add test for DateTime + add test for TimeSpan * Value type comparison + implement value type handling for expression compare ~ fix timespan test to use correct expecting values * add more test & simplify + add more corner test ~ replace activator with expression default ~ replace member.reflectedtype with item.type * Fix typos in docs (#3164) * Mark snackbarInfos as readonly * Fix unused snackbar title parameter * Override ReleaseResources * Fix missing comment param Co-authored-by: David <[email protected]> Co-authored-by: puschie286 <[email protected]>
* Unused vars (#3165) * Extract hex digits cache regex (#3140) * Start With Benchmark * Add ThemeGenerator for baseline benchmark * ExtractHexDigits cache REGEX * Methods Benchmarked + Tests * Theme Generator : Refactor ExtractHexDigits * Add test making sure ThemeGenerator is still logically equivalent to previous version. * Run format * Rename IsHexDigit Co-authored-by: Mladen Macanovic <[email protected]> * Fix Table THead Query Selector to target only first THead for FixedHeader and Resize features. (#3155) * Support types without object equal operator ( extend test for DateTime, TimeSpan ) (#3152) * Add test for DateTime and TimeSpan ~ set CultureInfo on test start + add test for DateTime + add test for TimeSpan * Value type comparison + implement value type handling for expression compare ~ fix timespan test to use correct expecting values * add more test & simplify + add more corner test ~ replace activator with expression default ~ replace member.reflectedtype with item.type * Fix typos in docs (#3164) * Mark snackbarInfos as readonly * Fix unused snackbar title parameter * Override ReleaseResources * Fix missing comment param Co-authored-by: David <[email protected]> Co-authored-by: puschie286 <[email protected]> * Revert "Unused vars (#3165)" (#3167) This reverts commit 13c9004. * added czech translations for components Added czech tranlations for data grid , file edit , time picker and date picker components * Added translations for carousel and color picker Added czech translations for carousel and color picker Co-authored-by: Mladen Macanović <[email protected]> Co-authored-by: David <[email protected]> Co-authored-by: puschie286 <[email protected]>
Closes #3133
Didn't have time to finish yet.
Need to test Regex.Matches vs our version as I am not 100% it's 100% logically equivalent. If it is, then it's way faster.
Also need to do some reading up on https://docs.microsoft.com/en-us/dotnet/standard/base-types/best-practices as static method
Regex.IsMatch
might also be worth considering...Edit: I'm not sure if additional steps need to be taken to actually take advantage of
RegexOptions.Compiled
?Also consider using Span in the future to do internal optimizations in string manipulation... might be worth it for 1.0.0
A good resource:
https://www.youtube.com/watch?v=FM5dpxJMULY&ab_channel=NickChapsas