[vim/vim] Reuse the same grow buffer across quickfix entries (PR #11365)

9 views
Skip to first unread message

Yegappan Lakshmanan

unread,
Oct 13, 2022, 10:30:16 PM10/13/22
to vim/vim, Subscribed

The grow buffer is allocated and freed for each quickfix entry. This is inefficient. Reuse the same grow buffer across all the entries.


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/11365

Commit Summary

  • 56e6648 Reuse the same grow buffer across quickfix entries

File Changes

(3 files)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/11365@github.com>

Yegappan Lakshmanan

unread,
Oct 13, 2022, 10:36:58 PM10/13/22
to vim/vim, Push

@yegappan pushed 1 commit.


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/11365/push/11324765249@github.com>

codecov[bot]

unread,
Oct 13, 2022, 10:48:19 PM10/13/22
to vim/vim, Subscribed

Codecov Report

Merging #11365 (a1f3d1b) into master (ba43e76) will increase coverage by 0.60%.
The diff coverage is 97.67%.

@@            Coverage Diff             @@

##           master   #11365      +/-   ##

==========================================

+ Coverage   81.87%   82.47%   +0.60%     

==========================================

  Files         162      152      -10     

  Lines      189326   179334    -9992     

  Branches    43064    40713    -2351     

==========================================

- Hits       155014   147910    -7104     

+ Misses      21769    19159    -2610     

+ Partials    12543    12265     -278     
Flag Coverage Δ
huge-clang-none 82.75% <97.67%> (-0.01%) ⬇️
huge-gcc-none ?
huge-gcc-testgui 53.15% <97.61%> (-0.01%) ⬇️
huge-gcc-unittests 0.29% <0.00%> (-0.01%) ⬇️
linux 82.47% <97.67%> (-0.07%) ⬇️
mingw-x64-HUGE ?
mingw-x86-HUGE ?
windows ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/quickfix.c 90.84% <97.61%> (-0.45%) ⬇️
src/alloc.c 78.21% <100.00%> (-0.16%) ⬇️
src/regexp_bt.c 78.48% <0.00%> (-7.48%) ⬇️
src/json.c 77.84% <0.00%> (-5.47%) ⬇️
src/regexp_nfa.c 85.15% <0.00%> (-4.72%) ⬇️
src/libvterm/src/parser.c 55.18% <0.00%> (-4.15%) ⬇️
src/edit.c 82.88% <0.00%> (-3.49%) ⬇️
src/gui.c 69.72% <0.00%> (-3.16%) ⬇️
src/normal.c 87.97% <0.00%> (-3.00%) ⬇️
src/libvterm/src/screen.c 50.18% <0.00%> (-2.85%) ⬇️
... and 123 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/11365/c1278400372@github.com>

Bram Moolenaar

unread,
Oct 14, 2022, 8:08:11 AM10/14/22
to vim/vim, Subscribed


> The grow buffer is allocated and freed for each quickfix entry. This
> is inefficient. Reuse the same grow buffer across all the entries.

Thanks, I'll include it.

Perhaps the buffer should be cleared once an operation is done, e.g.
when it uses more than 300 bytes of memory.

--
TIM: To the north there lies a cave, the cave of Caerbannog, wherein, carved
in mystic runes, upon the very living rock, the last words of Olfin
Bedwere of Rheged make plain the last resting place of the most Holy
Grail.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/// Bram Moolenaar -- ***@***.*** -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/11365/c1278919280@github.com>

Bram Moolenaar

unread,
Oct 14, 2022, 8:12:03 AM10/14/22
to vim/vim, Subscribed

Closed #11365 via 975a665.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/11365/issue_event/7589818116@github.com>

Yegappan Lakshmanan

unread,
Oct 15, 2022, 3:47:02 PM10/15/22
to vim...@googlegroups.com, reply+ACY5DGHJ2E3OSA7A6X...@reply.github.com, vim/vim, Subscribed
Hi Bram,

On Fri, Oct 14, 2022 at 5:08 AM Bram Moolenaar <vim-dev...@256bit.org> wrote:


> The grow buffer is allocated and freed for each quickfix entry. This
> is inefficient. Reuse the same grow buffer across all the entries.

Thanks, I'll include it.

Perhaps the buffer should be cleared once an operation is done, e.g.
when it uses more than 300 bytes of memory.



I have created PR #11379 to free the grow array buffer after use if it uses more
than 2K bytes of memory.

- Yegappan
 

vim-dev ML

unread,
Oct 15, 2022, 3:47:19 PM10/15/22
to vim/vim, vim-dev ML, Your activity

Hi Bram,

On Fri, Oct 14, 2022 at 5:08 AM Bram Moolenaar ***@***.***>
wrote:


>
> > The grow buffer is allocated and freed for each quickfix entry. This
> > is inefficient. Reuse the same grow buffer across all the entries.
>
> Thanks, I'll include it.
>
> Perhaps the buffer should be cleared once an operation is done, e.g.
> when it uses more than 300 bytes of memory.
>
>
>
I have created PR #11379 to free the grow array buffer after use if it uses
more
than 2K bytes of memory.

- Yegappan


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/11365/c1279820687@github.com>

Reply all
Reply to author
Forward
0 new messages