-
Sub-task
-
Resolution: Fixed
-
P3
-
9
-
None
-
b50
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8085592 | emb-9 | Hannes Wallnoefer | P3 | Resolved | Fixed | team |
JDK-8087026 | 8u65 | Hannes Wallnoefer | P3 | Resolved | Fixed | b01 |
JDK-8072635 | 8u60 | Hannes Wallnoefer | P3 | Resolved | Fixed | b03 |
JDK-8138517 | emb-8u65 | Unassigned | P3 | Resolved | Fixed | b01 |
JDK-8076940 | emb-8u60 | Hannes Wallnoefer | P3 | Resolved | Fixed | team |
Mostly the property handling seems to be a bottleneck. For small JSON objects, we have only 1-2 properties, but the findElement in PropertyHashMap then becomes a bottleneck.
For larger objects, the general property handling also takes time. The various JSON function are also implemented "by spec" for compliance and could use optimization work. Parsing/lexing JSON also takes a lot of time. We should probably add JSON to the code cache or serialize JSON objects or something.
One (rather messy) way to do it, is to treat constant property map literals for JSON such as the FieldObjectCreator does -generate bytecode with putfields.
Hannes says: I think for property maps the key is to use spill - we can populate the object much easier, and accessors are cached already (Marcus comments: but all defineOwnProperty that JSON.parse does already create spill properties?)
Hannes also says: well we use the ScriptObject API. We should use some bulk methods to create properties and maps. (good idea)
Now with my concat fix checked in you can use
https://github.com/ysangkok/js-clrs-btree
as a JSON benchmark. All it does is parse assorted JSON in various forms.
For larger objects, the general property handling also takes time. The various JSON function are also implemented "by spec" for compliance and could use optimization work. Parsing/lexing JSON also takes a lot of time. We should probably add JSON to the code cache or serialize JSON objects or something.
One (rather messy) way to do it, is to treat constant property map literals for JSON such as the FieldObjectCreator does -generate bytecode with putfields.
Hannes says: I think for property maps the key is to use spill - we can populate the object much easier, and accessors are cached already (Marcus comments: but all defineOwnProperty that JSON.parse does already create spill properties?)
Hannes also says: well we use the ScriptObject API. We should use some bulk methods to create properties and maps. (good idea)
Now with my concat fix checked in you can use
https://github.com/ysangkok/js-clrs-btree
as a JSON benchmark. All it does is parse assorted JSON in various forms.
- backported by
-
JDK-8072635 Various performance issues parsing JSON
-
- Resolved
-
-
JDK-8076940 Various performance issues parsing JSON
-
- Resolved
-
-
JDK-8085592 Various performance issues parsing JSON
-
- Resolved
-
-
JDK-8087026 Various performance issues parsing JSON
-
- Resolved
-
-
JDK-8138517 Various performance issues parsing JSON
-
- Resolved
-