Bram Moolenaar wrote: > Christian Brabandt wrote: > > > On Mi, 30 Okt 2019, Bram Moolenaar wrote: > > > > > > Andy Massimino wrote: > > > > > > > I think the problem is that vim makes an assumption about tag line > > > > lengths in order to seek around the file to do binary search. Before > > > > 8.1.1094 the line length check was there but faulty, and long lines > > > > could cause failures later on or just silently not find tags properly. > > > > Previously, vim doing the wrong thing generally worked and was faster. > > > > The reason it is slow now is because it's using linear search as > > > > binary search could (in theory) get stuck. > > > > > > > > Depending on the ctags implementation you can try > > > > --pattern-length-limit=[N] to shorten the lines. Also using > > > > --tag-relative=yes can possibly shorten the filenames. That class: > > > > name is still an issue though there may be a way to truncate/disable. > > > > > > > > Regarding this broader issue.. the current situation is not very user > > > > friendly since there is not even a real warning message, things just > > > > go slow. Is there any harm in increasing the limit to, say, 1022 or > > > > 2046? > > > > > > It's not that simple. Increasing the size also means that Vim reads > > > more of the file, which may make it slower. Best would be to > > > dynamically increase the size when a long line is found. That also > > > avoids imposing an arbitrary limit, even when it seems big enough (like > > > 500 bytes was longer than what any tags line would be 10 years ago). > > > > But it's been 512 for as long as Vim7 exists, so at least 15 years. > > Clearly, we can increase the line length limit by 50%? > > How many more tag files would we accept then? > It's not like we suddenly accept 90% more, right?
I just checked the tag file of a c++ project a work. The longest line was ~2100 characters, which is way over 512. What are the consequences? Slow search or even failure to resolve tags? Regards Dominique -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/CAON-T_iqNbfxomnLL_QC%3DNQQiwyfy3FEDswXhTYjRD4-onRoEA%40mail.gmail.com.
