]> granicus.if.org Git - clang/commit
[cindex.py] Add cache for CompletionChunk spellings
authorTobias Grosser <grosser@fim.uni-passau.de>
Sat, 19 Jan 2013 11:03:44 +0000 (11:03 +0000)
committerTobias Grosser <grosser@fim.uni-passau.de>
Sat, 19 Jan 2013 11:03:44 +0000 (11:03 +0000)
commit69a8552f85c1b926320418cb98fe02988c79578f
tree5f39ee90943f80698533e506ce39a8b3670a7c65
parenteca36d1ae23d0e4c46a3c2c2b91a19f4a2f8055d
[cindex.py] Add cache for CompletionChunk spellings

Most of the CompletionChunks represent braces, colons or other one
character spellings. There is no need to call libclang, to figure out
how to write a colon. Instead we use an internal cache to retrieve the
correct spelling. As function calls from python are very expensive and
this is a performance critical part of auto completion this patch makes
formatting of auto completion results a lot faster.

Formatting time changes from 0.57 to 0.45 seconds

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172901 91177308-0d34-0410-b5e6-96231b3b80d8
bindings/python/clang/cindex.py