dart-lang / http_parser

A platform-independent Dart package for parsing and serializing HTTP formats.
https://pub.dev/packages/http_parser
BSD 3-Clause "New" or "Revised" License
38 stars 28 forks source link

transformResponse take too long #64

Open nlgtuankiet opened 1 year ago

nlgtuankiet commented 1 year ago
Screenshot 2022-12-19 at 16 45 04

Due to JSON decode take 40.5ms on main isolate hence create a UI jank. Maybe we can move the decode function to a background isolate using the compute function?

nlgtuankiet commented 1 year ago

@nex3 any thoughts about this?

nex3 commented 1 year ago

Sorry, I no longer work on the Dart team

nlgtuankiet commented 1 year ago

@kevmoo any thoughts about this?

kevmoo commented 1 year ago

Look at pkg:dio? JsonDecoder.convert is synchronous. Guessing that should use a streaming parse to improve performance. I don't see http_parser in thi stack!