clarification please: lag by textcodes in menu/database

For both Ace and MV there are scripts that enable the use of textcodes (even advanced textcodes) inside the menu and the database.
However in both cases there also was the warning that enabling that option will add a lot of processing and cause lag on slower computers.

What I would like to know is what exactly is causing the lag, especially if that is something due to the way the current menues are programmed (and as such might be solved by replacing those other parts) or if it is something caused by the programming language or the interpreter itself. Or is it something that is caused only by a few special textcodes like drawing an icon.
In my opinion there should be no lag if the textcodes are only processed once upon entering the menu, but I don't know the update functions used in the menues.

Additionally, if some one has used those plugins for MV, I would like an estimate on how much lag that really is.


Background info: I plan to commission a non-exclusive (which means I plan to make the final result public) advanced message plugin for MV with several special features I want that are not available yet. The answers to this will help me determine if I should include something like this or not.
I've used Victor Engine's escape codes and haven't noticed any difference to be honest. Might be that I've already had a terrible lag meaning I didn't notice a difference though 🙂
Without seeing the scripts, my guess is that these would be using logic similar to the message boxes, where the text is processed character by character, rather than all at once, and each character is checked for a potential escape code with subsequent processing. This would be a lot slower. It's also possible that the whole thing could be redrawn every time you move the mouse or cursor - at least it would be when you move enough to cause the list to scroll up or down.
@Shaz that sounds right - especially since the mentioned functions are often part of a message system script/plugin.

Can you think of a way to identify textcodes faster than that? Especially if the way of show text is also open to discussion? Part of the planned functions will be a multilanguage option, which means the show text command has to be modified anyway.
Can you think of a way to identify textcodes faster than that?
Regex split and PIXI text. However, PIXI text doesn't support multistyling, so it's necessary to create a text style depending on escape text generator.

Original thread: https://forums.rpgmakerweb.com/threads/clarification-please-lag-by-textcodes-in-menu-database.90062/