parsedData getter executes parsedFn every time it is called, even when there is no change to the data. Couldn't we cache the parsed data? This would avoid parsing the entire json structure every time we call this getter.
Here is the existing code:
/// If a parserFn is provided, this getter can be used to fetch the parsed data.
TParsed? get parsedData {
final data = this.data;
final parserFn = this.parserFn;
if (data == null) {
return null;
}
return parserFn(data);
}
parsedData
getter executesparsedFn
every time it is called, even when there is no change to the data. Couldn't we cache the parsed data? This would avoid parsing the entire json structure every time we call this getter. Here is the existing code: