-
Notifications
You must be signed in to change notification settings - Fork 756
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
[Bug]: Performance degradation observed in Ballerina version 2201.8.5 compared to 2201.8.4 #42402
Comments
Changes introduced with the PR #41936 caused this. |
The fix added with the PR #41936 tries to address the following problem. import ballerina/io;
type Element record {|
Element ...;
|};
type A record {|
*Element;
|};
type B record {|
*Element;
|};
type C record {|
*Element;
D d;
|};
type D record {|
*Element;
string display?;
|};
type U A|B|C;
public function main() returns error? {
json val = {
"d": {
"display": "hello"
}
};
U u = check val.cloneWithType();
io:println(u);
} which gives
But, defining the type |
With the introduced fix the observed average time taken for conversion is |
This issue is NOT closed with a proper Reason/ label. Make sure to add proper reason label before closing. Please add or leave a comment with the proper reason label now. |
Description
A slowness is observed in the version 2201.8.5 when using
fromJsonWithType()
for binding a large json to a record. It's taking much time for conversion than 2201.8.4Steps to Reproduce
Output with 2201.8.5 ->
Output with 2201.8.4 ->
random_data.json
No response
Affected Version(s)
No response
OS, DB, other environment details and versions
No response
Related area
-> Runtime
Related issue(s) (optional)
No response
Suggested label(s) (optional)
No response
Suggested assignee(s) (optional)
No response
The text was updated successfully, but these errors were encountered: