Patch 8.2.4553
Problem:    Linear tag search is a bit slow.
Solution:   Remove a vim_ftell() call. (Yegappan Lakshmanan, closes #9937)
Files:      src/tag.c, src/testdir/test_taglist.vim


*** ../vim-8.2.4552/src/tag.c   2022-03-11 14:53:59.820847446 +0000
--- src/tag.c   2022-03-12 17:35:15.210916887 +0000
***************
*** 2092,2101 ****
                eof = cs_fgets(st->lbuf, st->lbuf_size);
            else
  #endif
-           {
-               sinfo_p->curr_offset = vim_ftell(st->fp);
                eof = vim_fgets(st->lbuf, st->lbuf_size, st->fp);
-           }
        } while (!eof && vim_isblankline(st->lbuf));
  
        if (eof)
--- 2092,2098 ----
***************
*** 2850,2856 ****
                return;
            }
  
!           if (st->state == TS_STEP_FORWARD)
                // Seek to the same position to read the same line again
                vim_ignored = vim_fseek(st->fp, search_info.curr_offset,
                                                                     SEEK_SET);
--- 2847,2853 ----
                return;
            }
  
!           if (st->state == TS_STEP_FORWARD || st->state == TS_LINEAR)
                // Seek to the same position to read the same line again
                vim_ignored = vim_fseek(st->fp, search_info.curr_offset,
                                                                     SEEK_SET);
*** ../vim-8.2.4552/src/testdir/test_taglist.vim        2022-03-06 
14:27:06.495895690 +0000
--- src/testdir/test_taglist.vim        2022-03-12 17:35:15.210916887 +0000
***************
*** 259,266 ****
--- 259,273 ----
    call writefile(tagslines, 'Xtags')
    set tags=Xtags
  
+   " try with binary search
+   set tagbsearch
    call feedkeys(":tag inbou\<C-A>\<C-B>\"\<CR>", 'xt')
    call assert_equal('"tag inboundGSV inboundGovernor 
inboundGovernorCounters', @:)
+   " try with linear search
+   set notagbsearch
+   call feedkeys(":tag inbou\<C-A>\<C-B>\"\<CR>", 'xt')
+   call assert_equal('"tag inboundGSV inboundGovernor 
inboundGovernorCounters', @:)
+   set tagbsearch&
  
    call delete('Xtags')
    set tags&
*** ../vim-8.2.4552/src/version.c       2022-03-12 14:51:12.765797435 +0000
--- src/version.c       2022-03-12 17:37:46.702476309 +0000
***************
*** 752,753 ****
--- 752,755 ----
  {   /* Add new patch number below this line */
+ /**/
+     4553,
  /**/

-- 
"Women marry men hoping they will change. Men marry women hoping
they will not. So each is inevitably disappointed."
 - Einstein

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
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/20220312173949.C032B1C79E4%40moolenaar.net.

Raspunde prin e-mail lui