Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Don't bother title-casing property names for lenient lookup #425

Merged
merged 1 commit into from
Jul 24, 2014

Conversation

toofishes
Copy link
Contributor

Profiling shows a significant amount of decoding time (>25%!) in this
hotspot when dealing with large, repetitive JSON documents using
underscore_style property names and requiring the leinent lookup.

The good news is there is no need to title case at all, once we remove
hyphens and underscores. The type accessor map uses a case-insensitive
lookup function, so any case will do. Note that no tests need modification
post-patch (although several would fail without the hyphen/underscore
removal).

Profiling shows a significant amount of decoding time (>25%!) in this
hotspot when dealing with large, repetitive JSON documents using
underscore_style property names and requiring the lenient lookup.

The good news is there is no need to title case at all, once we remove
hyphens and underscores. The type accessor map uses a case-insensitive
lookup function, so any case will do. Note that no tests need modification
post-patch (although several would fail without the hyphen/underscore
removal).
@toofishes toofishes changed the title Don't bother title-casing property names for leinent lookup Don't bother title-casing property names for lenient lookup Jul 24, 2014
@mythz
Copy link
Member

mythz commented Jul 24, 2014

ok great, thx for the perf analysis on this Dan. Can you approve the Contributor License Agreement so we can merge this, cheers.

@toofishes
Copy link
Contributor Author

I just approved the CLA.

mythz added a commit that referenced this pull request Jul 24, 2014
Don't bother title-casing property names for lenient lookup
@mythz mythz merged commit f378120 into ServiceStack:master Jul 24, 2014
@mythz
Copy link
Member

mythz commented Jul 24, 2014

cheers 👍

@toofishes toofishes deleted the lenient-perf branch July 25, 2014 02:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants