When a lot of visibleChars are present, something like this may be particularly slow, because of a lot of list creations
const getInitialPlaceholders = (selectedChar: string): Placeholder[] => {
const tokens = getVisibleChars();
const jumpableChars: Char[] = tokens
.map((char, absoluteIndex) => ({ char, absoluteIndex }))
.filter(char => isCharJumpable(char, tokens, selectedChar));
const placeholderGenerator = new IncrementalStringGenerator(jumpableChars.length);
return jumpableChars.map(char => getPlaceholder(char, placeholderGenerator));
};
When a lot of visibleChars are present, something like this may be particularly slow, because of a lot of list creations