nkh / P5-App-Asciio

Plain ASCII diagram
https://nkh.github.io/P5-App-Asciio/
53 stars 4 forks source link

cross mode Efficiency optimization #86

Closed qindapao closed 1 year ago

qindapao commented 1 year ago

@nkh

https://github.com/qindapao/P5-App-Asciio/commit/9617794e99891cd12569cd29d3c4ad8a5b6fdb49

For the cross mode, I made some optimizations, only drawing the part that the user can see.

You may think it is unnecessary, but I use cygwin to run asciio, and the efficiency is not as high as that of native linux.

I added the following, because if the canvas is not automatically drawn when the scroll bar is moving, some characters on the cross layer will not be refreshed in time.

$window->signal_connect(configure_event => sub { $self->update_display() if($self->{USE_CROSS_MODE}) ; }) ; $sc_window->get_hadjustment()->signal_connect(value_changed => sub { $self->update_display() if($self->{USE_CROSS_MODE}) ; }) ; $sc_window->get_vadjustment()->signal_connect(value_changed => sub { $self->update_display() if($self->{USE_CROSS_MODE}) ; }) ;

nkh commented 1 year ago

Do you want this commit integrated already?

qindapao commented 1 year ago

@nkh

If there is no other problem, I hope to merge it.

nkh commented 1 year ago

You hope to merge it ... does that mean that I can do the merge now or do I have to wait for your signal?

qindapao commented 1 year ago

@nkh

You can merge now.

I will modify the cross related documents this afternoon.

qindapao commented 1 year ago

@nkh

Sometimes my English expression is not so accurate.

nkh commented 1 year ago

You have a fix_strip_group branch #85, is that ready to merge too?

qindapao commented 1 year ago

@nkh

yes