Shevek
Shevek
... and it is the damn animations, which was my guess earlier. We need to disable animations not in visible panes. Anything except the absolute current window should NOT be...
Going into every slack window and switching the 'channel' to DM to slackbot (which never posts animations) makes the CPU usage drop to 1%, which is where it should be.
Further experimentation: Yes, it's almost definitely the animations. A minimum granularity of a shared 100ms or even 200ms timer should be just fine. This is still effectively IRC, not Netflix....
interestingly, QT even chews CPU if the animation is scrolled offscreen, as long as it's in the foreground channel.
Most web browsers don't run timeouts for offscreen animations, and limit the granularity of setTimeout() in JavaScript for this very reason. This really is about animations.
Very good idea, and somewhat artfully chosen. #line directives were a pain in the [....] and I'll spend a bit more time on this.
I'll gladly take patches; I don't have a great deal of time to work on features on this project right now.
If Feature.KEEPCOMMENTS is off, they should be removed.
CppReader behaves as a Java Reader. Preprocessor has its own lexer-like API if you want to use it directly. Keeping comments can be enabled or disabled using Feature.KEEPCOMMENTS or Feature.KEEPALLCOMMENTS....
Re: KEEPCOMMENTS: I didn't check again, but that's probably true, but it's fairly easy to filter the returned token stream by type yourself. Filtering comments within the API is only...