|
Rewrite base::JSONReader to be 35-40% faster, depending on the input string.
This change does the following:
* Parses the input string and generates the object representation in O(n) time.
* Optimizes string decoding by using StringPiece where possible, which also
introduces the JSON_DETACHABLE_CHILDREN parser option.
* Makes JSONReader a simpler interface by hiding the parser details in an
internal JSONParser class.
BUG= 49212, 111581, 121469
TEST=Hopefully covered by all test suites. New tests added for edge cases.
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=137430
Total comments: 2
Total comments: 98
Total comments: 38
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+1830 lines, -1010 lines) |
Patch |
|
M |
base/base.gyp
|
View
|
1
2
3
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
base/base.gypi
|
View
|
1
2
3
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
base/base_export.h
|
View
|
1
2
3
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
|
M |
base/debug/trace_event_unittest.cc
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
A |
base/json/json_parser.h
|
View
|
1
2
3
|
1 chunk |
+273 lines, -0 lines |
0 comments
|
Download
|
|
A |
base/json/json_parser.cc
|
View
|
1
2
3
|
1 chunk |
+972 lines, -0 lines |
0 comments
|
Download
|
|
A |
base/json/json_parser_unittest.cc
|
View
|
1
2
3
|
1 chunk |
+293 lines, -0 lines |
0 comments
|
Download
|
|
M |
base/json/json_reader.h
|
View
|
|
4 chunks |
+27 lines, -147 lines |
0 comments
|
Download
|
|
M |
base/json/json_reader.cc
|
View
|
|
5 chunks |
+28 lines, -652 lines |
0 comments
|
Download
|
|
M |
base/json/json_reader_unittest.cc
|
View
|
1
2
3
|
12 chunks |
+186 lines, -148 lines |
0 comments
|
Download
|
|
M |
base/string_util.cc
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
base/values.h
|
View
|
1
2
3
|
4 chunks |
+6 lines, -9 lines |
0 comments
|
Download
|
|
M |
base/values.cc
|
View
|
1
2
|
2 chunks |
+8 lines, -0 lines |
0 comments
|
Download
|
|
M |
chrome/browser/automation/testing_automation_provider.cc
|
View
|
1
2
3
|
1 chunk |
+1 line, -3 lines |
0 comments
|
Download
|
|
M |
chrome/browser/extensions/settings/settings_leveldb_storage.cc
|
View
|
|
3 chunks |
+3 lines, -5 lines |
0 comments
|
Download
|
|
M |
chrome/browser/prefs/pref_model_associator.cc
|
View
|
1
2
|
2 chunks |
+2 lines, -3 lines |
0 comments
|
Download
|
|
M |
chrome/browser/ui/webui/tab_modal_confirm_dialog_webui.cc
|
View
|
1
2
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
|
M |
chrome/common/extensions/api/extension_api.cc
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
chrome/common/extensions/extension_l10n_util_unittest.cc
|
View
|
|
1 chunk |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
chrome/common/extensions/extension_unpacker_unittest.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
chrome/common/net/gaia/oauth2_mint_token_flow.cc
|
View
|
1
2
3
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
|
M |
chrome/common/net/gaia/oauth2_mint_token_flow_unittest.cc
|
View
|
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
|
M |
chrome/installer/util/master_preferences_unittest.cc
|
View
|
1
2
3
|
4 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
chrome/test/base/ui_test_utils.cc
|
View
|
1
2
3
|
1 chunk |
+4 lines, -19 lines |
0 comments
|
Download
|
|
M |
net/test/base_test_server.cc
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
net/test/spawner_communicator.cc
|
View
|
1
2
3
|
1 chunk |
+1 line, -3 lines |
0 comments
|
Download
|
Total messages: 14 (0 generated)
|