[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

Timm Baeder via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 24 07:39:14 PDT 2023


Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>
Message-ID:
In-Reply-To: <llvm/llvm-project/pull/66514/clang at github.com>


tbaederr wrote:

> > Kind of - [this run](http://llvm-compile-time-tracker.com/compare.php?from=6ade5183232dc1398205d7c9dbe21243b2560837&to=5ad516d39b6706af6fd55eded264aba4ba432ad2&stat=instructions:u) only shows noticeable slowdown in one test. But we also only highlight the main file right now - that means we don't get syntax highlighting in included files and implementing that would probably make it a bit slower as well since we'd have to map the save points to their FileID.
> 
> I think we should do it for includes to. Did you play with `reserve`? I think it would be reasonable to preallocate maybe ~1k check points - which should just be 8kb per file, which would be reasonable

I've already switched to the max file size variant now, is that alright or do you want me to pursue the checkpoint version again?

https://github.com/llvm/llvm-project/pull/66514


More information about the cfe-commits mailing list