Skip to content

Conversation

k-takata
Copy link
Member

@k-takata k-takata commented Dec 9, 2017

There was a report that 8.0.1369 8.0.1343 caused slowdown on some environment:
https://groups.google.com/d/msg/vim_dev/2AaZMN1T6K8/x4QxC_XbBQAJ

This PR is trying to solve it.

Redraw directly instead of using WM_PAINT.
When updating the cursor, functions were called in the following
sequence:

* out_flush()
* gui_update_cursor()
* gui_mch_flush()

However, out_flush() itself calls gui_mch_flush() from inside it
(through some functions).  Therefore gui_mch_flush() was called twice.
Unfortunately gui_mch_flush() is very slow when the directx renderer is
used.

Now the out_flush_cursor() function can be used instead of those 3
functions.  It issues gui_mch_flush() only once after drawing the
cursor.

This also disables issuing gui_mch_flush() via update_single_line()
in the main_loop() function.
@codecov
Copy link

codecov bot commented Dec 9, 2017

Codecov Report

Merging #3 into master will increase coverage by 0.26%.
The diff coverage is 72%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master       #3      +/-   ##
==========================================
+ Coverage   74.34%    74.6%   +0.26%     
==========================================
  Files          92       92              
  Lines      143868   132935   -10933     
==========================================
- Hits       106956    99176    -7780     
+ Misses      36912    33759    -3153
Impacted Files Coverage Δ
src/edit.c 85.36% <0%> (-1.14%) ⬇️
src/search.c 73.83% <0%> (-2.8%) ⬇️
src/ui.c 46.34% <0%> (-1.74%) ⬇️
src/message.c 68.75% <100%> (+1.94%) ⬆️
src/main.c 55.54% <100%> (-0.86%) ⬇️
src/channel.c 82.87% <100%> (-2.84%) ⬇️
src/term.c 50.93% <100%> (-0.15%) ⬇️
src/gui.c 47.68% <64.28%> (-2.69%) ⬇️
src/getchar.c 74.24% <66.66%> (-2.21%) ⬇️
src/screen.c 73.93% <75%> (-3.16%) ⬇️
... and 17 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ae6f865...3d273aa. Read the comment docs.

@k-takata
Copy link
Member Author

I created a PR to the official repository: vim#2560

@k-takata
Copy link
Member Author

Merged as 8.0.1449.

@k-takata k-takata closed this Jan 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant