u/virtualmnemonic

Tip: Improving JSON Encode/Decode Performance

Using file.readAsString or accessing the body of a HTTP response in text always requires a pass through the utf8 decoder. If you're simply passing the decoded utf8 string through jsonDecode, you can combine them for much better performance.

> utf8.decoder.fuse(jsonDecoder).convert(source)

The inverse works as well: fuse jsonEncoder with utf8 encoder to get a List<int> from input Map<String, dynamic>.

Source and relevant discussion: https://github.com/dart-lang/sdk/issues/55522

u/virtualmnemonic — 4 days ago

I've found that storing media files in the temp/cache directory results in errors as Android and iOS will often wipe everything in these directories without warning to free up device space, even if the file was created seconds ago. On devices with severely low storage available, it's consistent. Should I migrate over to application support?

reddit.com
u/virtualmnemonic — 23 days ago