mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-30 10:20:15 +07:00
[js] WEB-74235 optimize getting mapping for empty cases
GitOrigin-RevId: 1d83dd42d430207e9ed9b8d0b255e97848657321
This commit is contained in:
committed by
intellij-monorepo-bot
parent
e616a79348
commit
c77a96eb17
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.lang;
|
||||
|
||||
import com.intellij.injected.editor.VirtualFileWindow;
|
||||
@@ -119,6 +119,7 @@ public abstract class PerFileMappingsBase<T> implements PersistentStateComponent
|
||||
}
|
||||
synchronized (myMappings) {
|
||||
ensureStateLoaded();
|
||||
if (myMappings.isEmpty()) return null; // fast path
|
||||
T t = getMappingForHierarchy(file);
|
||||
if (t != null) return t;
|
||||
t = getMappingForHierarchy(originalFile);
|
||||
|
||||
Reference in New Issue
Block a user