基于三元组(Trigram)的可持久化IDE索引,实现快速启动
Trigram-Based Persistent IDE Indices with Quick Startup
AI总结:
针对代码仓库版本切换时三元组索引重建耗时的问题,提出可持久化三元组索引,仅应用版本间变更实现快速启动,还扩展支持CamelHump搜索,显著提升性能。
摘要:
加速文本文件集合中查找操作的一种常用方法是使用三元组(trigram)索引。该结构本质上是一个从三元组(由三个字符组成的序列)到包含该三元组的文件集合的映射。搜索模式时,通过对模式中各三元组对应的文件集合取交集,确定潜在的文件位置,随后仅在这些文件中继续搜索。\n 然而在代码仓库中,三元组索引会随不同版本演变。切换到新版本时,该索引通常需要从零构建,这是一项耗时的任务,而我们希望索引能实现近乎零时间的启动。\n 因此,我们探索了用于全文和关键词模式搜索的可持久化三元组索引版本。我们的方法仅利用当前版本的三元组索引,在切换版本时仅应用版本间的变更,显著提升了性能。此外,我们扩展了数据结构,以支持针对类名和函数名的CamelHump搜索。
英文摘要:
One common way to speed up the find operation within a set of text files involves a trigram index. This structure is merely a map from a trigram (sequence consisting of three characters) to a set of files which contain it. When searching for a pattern, potential file locations are identified by intersecting the sets related to the trigrams in the pattern. Then, the search proceeds only in these files. However, in a code repository, the trigram index evolves across different versions. Upon checking out a new version, this index is typically built from scratch, which is a time-consuming task, while we want our index to have almost zero-time startup. Thus, we explore the persistent version of a trigram index for full-text and key word patterns search. Our approach just uses the current version of the trigram index and applies only the changes between versions during checkout, significantly enhancing performance. Furthermore, we extend our data structure to accommodate CamelHump search for class and function names.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。