optimizing AnalysisService