[clangd] Cache config files for 5 seconds, without revalidating with stat.
Summary: This is motivated by: - code completion: nice to do no i/o on the request path - background index: deciding whether to enqueue each file would stat the config file thousands of times in quick succession. Currently it's applied uniformly to all requests though. This gives up on performing stat() outside the lock, all this achieves is letting multiple threads stat concurrently (and thus finish without contention for nonexistent files). The ability to finish without IO (just mutex lock + integer check) should outweigh this, and is less sensitive to platform IO characteristics. Reviewers: kadircet Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D83755
Loading
Please sign in to comment