summaryrefslogtreecommitdiff
path: root/src/word_db.cc
AgeCommit message (Collapse)Author
2025-04-02Tweak ranked match behaviour to consider the number of full wordsMaxime Coste
Tracking the number of query words that appear as full words in the candidate seems to fix a few cases where the existing fuzzy matching algorithm was not great. I have been running with this for a while and did not notice any annoyances, the whole RankedMatch code probably deserves more attention but this seems to go in the right direction.
2024-08-16include headers cleanupAdriĆ  Arrufat
2024-02-28Templatize StringData::createMaxime Coste
This improves performance by letting the compiler optimize most use cases where string count and length are known are compile time.
2023-11-17Improve WordDB performance by precomputing hashesMaxime Coste
Avoid multiple computation of string hashes by making it possible to pre-compute and pass hashes to interned strings and hash maps.
2023-10-25Speed up WordSplitterMaxime Coste
Only do utf8 decoding once per codepoint instead of twice, limit the byte length instead of the codepoint length.
2021-05-28Support opening files bigger than 2 GiBMaxime Coste
The real technical limit is with lines bigger than 2 GiB and buffers with more than 2 Gi lines, refactor buffer loading to make it possible to load those files. Fix an overflow with the hash_data function at the same time
2020-11-07Fix performance issue with word completionMaxime Coste
When pasting many words with <a-p> we can end-up with a huge concatenated word and many selections, the previous code ended up iterating from each selection cursor to that word start and end to find the word under the cursor. This could lead to performance issue as each selection would trigger iteration on that huge word. This is unnecessary as word completion has a word length limit, so we now take it into account to avoid iterating to far from the cursor position.
2019-08-31Limit the amounts of calls to get_extra_word_charsMaxime Coste
This is a relatively expensive function as it needs to resolve an option, which uses dynamic_cast.
2019-03-22Limit WordDB word length to 50 bytesMaxime Coste
Should improve both performance and relevancy of the word completions.
2019-01-24Header and dependency cleanupMaxime Coste
2018-11-27Make '_' the default extra_word_chars, and remove built-in supportMaxime Coste
Fixes #2599
2018-07-26Lazily iterate over words instead of gathering them in a vectorMaxime Coste
2018-05-26Do not expose C++ typeid().name to user facing errors on wrong option typeMaxime Coste
Fixes #2079
2018-04-19Move get_word_db to word_db.ccMaxime Coste
2018-04-05Fix some trailing spaces and a tab that sneaked into the code baseMaxime Coste
2017-06-26Use the extra_word_chars option in word based normal commandsMaxime Coste
the completion_extra_word_chars is now gone, superseeded by extra_word_chars that gets used both for completion and for normal mode. Fixes #1304
2017-06-26Change completion_extra_word_char to be a list of codepoints instead of a stringMaxime Coste
2017-03-16Fixes some clang-tidy warning and add a few missing meta.hh includeMaxime Coste
2017-03-07Replace uses of UnorderedMap with HashMapMaxime Coste
2017-02-23Refactor get_words to be simpler and fasterMaxime Coste
2017-02-23Fix support for non ascii chars in completion_extra_word_charMaxime Coste
2017-02-23Refactor WordDB::add_words to be slightly fasterMaxime Coste
2016-08-24Introduce the 'completion_extra_word_chars' optionMaxime Coste
This string option is used to get all the additional characters that should be considered as "word" character for the purpose of insert mode completion. Fixes #758
2016-05-17Use variadic macros for kak_assert to remove the need for COMMAMaxime Coste
2016-05-09Make utf8_iterator codepoint type and difference type configurableMaxime Coste
2016-03-29RankedMatch constructor handles empty query just fineMaxime Coste
2016-03-25Move UsedLetters with RankedMatchMaxime Coste
2016-03-16Use ByteCoords directly for buffer insert/erase/replaceMaxime Coste
2016-02-05Get rid of SharedStringMaxime Coste
2016-02-05dont intern SharedStrings but StringDataPtrMaxime Coste
2015-10-27Move more logic into RankedMatchMaxime Coste
2015-10-22Extract WordDB::RankedWord as RankedMatch in its own fileMaxime Coste
2015-10-21Remove legacy WordDB::find_matching methodMaxime Coste
2015-10-18Experiment with ranked word completion depending on word boundariesMaxime Coste
2015-10-17Move line parsing and to Buffer.cc directlyMaxime Coste
2015-09-23Refactor utf8::iterator to be on the safe sideMaxime Coste
utf8::iterator now knows the iterator valid range, and pass it to utf8 functions.
2015-05-22Move unit test functions in next to the code they are testingMaxime Coste
2015-03-10Tweak WordDB implementationMaxime Coste
2015-02-03Fix too strict assert and unneeded (lets hope) checkMaxime Coste
2015-01-31Rewrite line modifications, hopefully with easier to comprehend codeMaxime Coste
2015-01-27Store direct ref_ptr<StringStorage> for WordDB linesMaxime Coste
Storing a SharedString is a waste, we want the whole line.
2015-01-19rename SharedString::Storage to StringStorage and use directly in BufferMaxime Coste
2015-01-15Add a no copy shared string constructor, used for map lookup, and intern wordsMaxime Coste
2015-01-15Do not store lines to word in word db, just keep the old lines aliveMaxime Coste
2015-01-15Replace InternedStrings with SharedString, shared_ptr basedMaxime Coste
2015-01-11Track some more memoryMaxime Coste
2014-12-23Code refactoring in WordDBMaxime Coste
2014-12-22Minor cleanupMaxime Coste
2014-12-11Do not sort results of WordDB, simplify codeMaxime Coste
2014-10-28Refactor word_db, use an unordered mapMaxime Coste