Skip to content
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

Slow dataset serialization using TMVCJsonDataObjectsSerializer.DataSetToJsonArray #205

Closed
dsonda opened this issue Mar 30, 2019 · 4 comments
Assignees

Comments

@dsonda
Copy link
Contributor

dsonda commented Mar 30, 2019

TMVCJsonDataObjectsSerializer.DataSetToJsonArray is very slow do serialize a dataset containned in a class (DataModule or Form) with high number os class members.

The TMVCAbstractSerializer.GetNameAs and TMVCAbstractSerializer.IsIgnoredComponent are very slow with big classes (high number of fields) to read attributes using RTTI.

Sample attached.
dmvc_slow_serialization.zip

@danieleteti danieleteti self-assigned this Apr 3, 2019
@pedrooliveira01
Copy link
Contributor

Hello,
I Change MVCFramework.Serializer.JsonDataObjects to read one time attributes,
Test for me, please.

MVCFramework.Serializer.JsonDataObjects.zip

@dsonda
Copy link
Contributor Author

dsonda commented Apr 3, 2019

Before, it took about 25 seconds to serialize in my sample.
After changes, it took 0,215 seconds.
Great job!
Could you merge this change in master?

@danieleteti
Copy link
Owner

Good job. Let me do some tests using the 108 unit tests, and then the patch will go in the repo

@danieleteti
Copy link
Owner

Unittests OK. I did just some small changes. @pedrooliveira01 your changes will be merged in the repo. Thank you for your contribution.

danieleteti added a commit that referenced this issue Apr 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants