[json] IJPL-172038 More performance improvements for json schema FUS

- Prefer HashMap and HashSet over the Linked* collections to reduce overhead
- Prefer strict enum type in a map
- Run several test attempts to achieve more stable results


(cherry picked from commit 8254f2317efc10450adb40168f8159120aa87915)

IJ-CR-149952

GitOrigin-RevId: f8fde91b390057faa64ff4e8b40f9db67f9ac36e
This commit is contained in:
Nikita Katkov
2024-12-03 14:56:22 +01:00
committed by intellij-monorepo-bot
parent a12c2ab9e8
commit 0349903955
2 changed files with 2 additions and 2 deletions

View File

@@ -39,7 +39,7 @@ internal class JsonSchemaHighlightingSessionStatisticsCollector {
}
}
fun reportSchemaUsageFeature(featureKind: JsonSchemaFusFeature) {
fun reportSchemaUsageFeature(featureKind: JsonSchemaFusCountedFeature) {
val currentSession = getCurrentSession() ?: return
currentSession.featuresWithCount[featureKind] = currentSession.featuresWithCount.getOrDefault(featureKind, 0) + 1
}

View File

@@ -52,7 +52,7 @@ public class JsonSchemaPerformanceTest extends JsonSchemaHeavyAbstractTest {
registerJsonSchema(myFixture, schemaText, "json", it -> true);
myFixture.configureByFile("/azure-file.json");
myFixture.checkHighlighting(true, false, true);
}).start();
}).attempts(5).start();
}
public void testSwaggerHighlighting() {