k-paxian / dart-json-mapper

Serialize / Deserialize Dart Objects to / from JSON
https://pub.dev/packages/dart_json_mapper
Other
399 stars 33 forks source link

Performance degradation from version 1.7.13 to 2.1.15 #169

Closed sudarshanrao7 closed 2 years ago

sudarshanrao7 commented 2 years ago

Hi,

Thanks for this great library . We recently upgraded from 1.7.13 to 2.1.10. App Users with old phones started complaining about the performance of the app(Unresponsive UI for like 5-10 sec in multiple pages). We narrowed it down to dart-json-mapper. This issue is very evident in many of listview pages(though we paginate 20 at a time from server). Issue were more prominent where the classes had lot of List of other classes as properties. Tried the same on latest build 2.1.15 and issue still exists. Reverting back to 1.7.13 and testing on an old phone(Moto g - 2gb ram) seems to fix the issue. We ran a cpu and memory profile. Memory look fine, however CPU showed high utilization by reflectable 3.0.4 library.

k-paxian commented 2 years ago

Meanwhile you could consider using this approach as a workaround till I'll have enough time to improve the performance aspect

sudarshanrao7 commented 2 years ago

Thanks will try this approach.

k-paxian commented 2 years ago

Whenever you'll have an opportunity, please provide your feedback on version 2.2.0 performance