mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Added javadoc with optimization clarification
IJ-CR-114841 GitOrigin-RevId: ba30d234673429dd9cab378578c1c511d144d01e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
c1b7050f41
commit
091b261d23
@@ -201,6 +201,11 @@ public class CompositeElement extends TreeElement {
|
||||
return TreeUtil.findSibling(anchor, typesSet);
|
||||
}
|
||||
|
||||
/**
|
||||
* @implNote Optimization. Instead of just calling new {@code String(textToCharArray())} we try to delegate the text computation to the
|
||||
* first child, if there's only one, in hope it has optimized its own {@code getText()} and we thus can skip allocating buffer in
|
||||
* {@link AstBufferUtil}
|
||||
*/
|
||||
@Override
|
||||
public @NotNull String getText() {
|
||||
TreeElement firstChildNode = getFirstChildNode();
|
||||
|
||||
Reference in New Issue
Block a user