analyzeConfiguration method
Implementation
ConfigAnalysisResult analyzeConfiguration(ObslyConfig config) {
final rec = <String>[],
warn = <String>[],
err = <String>[],
perf = <String>[];
// Quick analysis - same logic, ultra-compact
if (config.enableScreenshotOnUi == true && config.enablePerformance == true)
perf.add('Screenshots + performance tracking may impact app speed');
if (config.sessionMaxLengthMins != null &&
config.sessionMaxLengthMins! > 480)
warn.add(
'Very long sessions (${config.sessionMaxLengthMins}min) may consume excessive memory');
if (config.bufferSize != null && config.bufferSize! > 1000)
warn.add(
'Large buffer size (${config.bufferSize}) may cause memory issues');
if (config.enableRateLimit == false && config.enablePerformance == true)
rec.add('Consider enabling rate limiting with performance tracking');
if (config.requestBlacklist?.isEmpty ?? true)
rec.add('Add request blacklist to filter unnecessary network calls');
if (config.rageClick?.screenshotPercent != null &&
config.rageClick!.screenshotPercent! > 50)
perf.add('High rage click screenshot percentage may impact performance');
return ConfigAnalysisResult(
recommendations: rec,
warnings: warn,
errors: err,
performanceNotes: perf);
}