Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
* [sup-talk] [PATCH 1/2] preemptively load messages when scrolling
@ 2009-08-23 18:46 Rich Lane
  2009-08-23 18:46 ` [sup-talk] [PATCH 2/2] ui responsiveness tweaks Rich Lane
  0 siblings, 1 reply; 6+ messages in thread
From: Rich Lane @ 2009-08-23 18:46 UTC (permalink / raw)


---
 lib/sup/modes/line-cursor-mode.rb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/sup/modes/line-cursor-mode.rb b/lib/sup/modes/line-cursor-mode.rb
index 246f2b5..0b1fd1d 100644
--- a/lib/sup/modes/line-cursor-mode.rb
+++ b/lib/sup/modes/line-cursor-mode.rb
@@ -77,7 +77,7 @@ protected
   end
 
   def cursor_down
-    call_load_more_callbacks buffer.content_height if @curpos == lines - 1
+    call_load_more_callbacks buffer.content_height if @curpos >= lines - [buffer.content_height/2,1].max
     return false unless @curpos < lines - 1
 
     if @curpos >= botline - 1
-- 
1.6.4



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [sup-talk] [PATCH 2/2] ui responsiveness tweaks
  2009-08-23 18:46 [sup-talk] [PATCH 1/2] preemptively load messages when scrolling Rich Lane
@ 2009-08-23 18:46 ` Rich Lane
  2009-08-26 21:15   ` Carl Worth
                     ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Rich Lane @ 2009-08-23 18:46 UTC (permalink / raw)


---
 bin/sup                            |    1 +
 lib/sup/modes/thread-index-mode.rb |    4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/bin/sup b/bin/sup
index 3d5b6c1..f3c6771 100755
--- a/bin/sup
+++ b/bin/sup
@@ -58,6 +58,7 @@ if $opts[:list_hooks]
 end
 
 Thread.abort_on_exception = true # make debugging possible
+Thread.current.priority = 1 # keep ui responsive
 
 module Redwood
 
diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb
index fb6b2ce..177431b 100644
--- a/lib/sup/modes/thread-index-mode.rb
+++ b/lib/sup/modes/thread-index-mode.rb
@@ -76,8 +76,7 @@ EOS
     @last_load_more_size = nil
     to_load_more do |size|
       next if @last_load_more_size == 0
-      load_threads :num => 1, :background => false
-      load_threads :num => (size - 1),
+      load_threads :num => size,
                    :when_done => lambda { |num| @last_load_more_size = num }
     end
   end
@@ -627,6 +626,7 @@ EOS
         BufferManager.draw_screen
         last_update = Time.now
       end
+      ::Thread.pass
       break if @interrupt_search
     end
     @ts.threads.each { |th| th.labels.each { |l| LabelManager << l } }
-- 
1.6.4



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [sup-talk] [PATCH 2/2] ui responsiveness tweaks
  2009-08-23 18:46 ` [sup-talk] [PATCH 2/2] ui responsiveness tweaks Rich Lane
@ 2009-08-26 21:15   ` Carl Worth
  2009-08-27  2:54     ` Ingmar Vanhassel
  2009-09-02  3:59   ` Rich Lane
  2009-09-03 17:58   ` William Morgan
  2 siblings, 1 reply; 6+ messages in thread
From: Carl Worth @ 2009-08-26 21:15 UTC (permalink / raw)


My message here really has nothing to do with Rich's patches
specifically, (so sorry about that), but his patches happened to
provide the perfect context for an issue I wanted to bring up. As is
typical of git-formatted patches, Rich's emails have subject lines
from his commit messages:

    [sup-talk] [PATCH 1/2] preemptively load messages when scrolling
    [sup-talk] [PATCH 2/2] ui responsiveness tweaks

As far as the git commits go, this subject line is one of the most
essential pieces of metadata to accompany the patch. Yet by default
sup doesn't display it at all, (requiring keypresses to display the
header and find the subject line). I think what I would like is for
sup to display the subject line everytime it changes significantly in
a thread, (specifically not regarding things like an initial "Re: "
getting added as significant).

I think I'd be willing to spend an entire line's worth of screen real
estate for this information---it's quite useful when people do
meaningful subject changes for sub-threads.

-Carl

Excerpts from Rich Lane's message of Sun Aug 23 11:46:11 -0700 2009:
> ---
>  bin/sup                            |    1 +
>  lib/sup/modes/thread-index-mode.rb |    4 ++--
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/bin/sup b/bin/sup
> index 3d5b6c1..f3c6771 100755
> --- a/bin/sup
> +++ b/bin/sup
> @@ -58,6 +58,7 @@ if $opts[:list_hooks]
>  end
>  
>  Thread.abort_on_exception = true # make debugging possible
> +Thread.current.priority = 1 # keep ui responsive
>  
>  module Redwood
>  
> diff --git a/lib/sup/modes/thread-index-mode.rb
> b/lib/sup/modes/thread-index-mode.rb
> index fb6b2ce..177431b 100644
> --- a/lib/sup/modes/thread-index-mode.rb
> +++ b/lib/sup/modes/thread-index-mode.rb
> @@ -76,8 +76,7 @@ EOS
>      @last_load_more_size = nil
>      to_load_more do |size|
>        next if @last_load_more_size == 0
> -      load_threads :num => 1, :background => false
> -      load_threads :num => (size - 1),
> +      load_threads :num => size,
>                     :when_done => lambda { |num| @last_load_more_size = num }
>      end
>    end
> @@ -627,6 +626,7 @@ EOS
>          BufferManager.draw_screen
>          last_update = Time.now
>        end
> +      ::Thread.pass
>        break if @interrupt_search
>      end
>      @ts.threads.each { |th| th.labels.each { |l| LabelManager << l } }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://rubyforge.org/pipermail/sup-talk/attachments/20090826/5b3011d5/attachment.bin>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [sup-talk] [PATCH 2/2] ui responsiveness tweaks
  2009-08-26 21:15   ` Carl Worth
@ 2009-08-27  2:54     ` Ingmar Vanhassel
  0 siblings, 0 replies; 6+ messages in thread
From: Ingmar Vanhassel @ 2009-08-27  2:54 UTC (permalink / raw)


Excerpts from Carl Worth's message of Wed Aug 26 23:15:36 +0200 2009:
> My message here really has nothing to do with Rich's patches
> specifically, (so sorry about that), but his patches happened to
> provide the perfect context for an issue I wanted to bring up. As is
> typical of git-formatted patches, Rich's emails have subject lines
> from his commit messages:
> 
>     [sup-talk] [PATCH 1/2] preemptively load messages when scrolling
>     [sup-talk] [PATCH 2/2] ui responsiveness tweaks
> 
> As far as the git commits go, this subject line is one of the most
> essential pieces of metadata to accompany the patch. Yet by default
> sup doesn't display it at all, (requiring keypresses to display the
> header and find the subject line). I think what I would like is for
> sup to display the subject line everytime it changes significantly in
> a thread, (specifically not regarding things like an initial "Re: "
> getting added as significant).
> 
> I think I'd be willing to spend an entire line's worth of screen real
> estate for this information---it's quite useful when people do
> meaningful subject changes for sub-threads.

Yeah, I completely agree. That would make sup even better for me.

Maybe this could be implemented as a 3-way toggle, toggling between
  - don't show subjects (current default?)
  - only show interesting subject changes
  - always show subject
in a threadview.

-Ingmar
-- 
Exherbo KDE, X.org maintainer


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [sup-talk] [PATCH 2/2] ui responsiveness tweaks
  2009-08-23 18:46 ` [sup-talk] [PATCH 2/2] ui responsiveness tweaks Rich Lane
  2009-08-26 21:15   ` Carl Worth
@ 2009-09-02  3:59   ` Rich Lane
  2009-09-03 17:58   ` William Morgan
  2 siblings, 0 replies; 6+ messages in thread
From: Rich Lane @ 2009-09-02  3:59 UTC (permalink / raw)


Just making sure these patches don't drop off your radar. I know
searching is supposed to make scrolling obsolete, but some Mutt users
asked for this. They'll see the light eventually.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [sup-talk] [PATCH 2/2] ui responsiveness tweaks
  2009-08-23 18:46 ` [sup-talk] [PATCH 2/2] ui responsiveness tweaks Rich Lane
  2009-08-26 21:15   ` Carl Worth
  2009-09-02  3:59   ` Rich Lane
@ 2009-09-03 17:58   ` William Morgan
  2 siblings, 0 replies; 6+ messages in thread
From: William Morgan @ 2009-09-03 17:58 UTC (permalink / raw)


Both of these patches are on the branch preemptive-loading, merged into
next. Thanks! It's a nice touch.

I didn't really notice any differe from thread prioritization and
Thread.pass call, but maybe that's my setup. Regardless, it can't hurt.

I also reworked the load-more callback mechanism to be a little more
thread safe and a little less insane. Now it uses a queue and has a
dedicated loader thread pulling things off of it. Message thread loading
is currently configured to just drop concurrent calls, so it should work
fine.

Now, all we need is a faster cursor in thread-index-mode. I will grant a
Sup medal to anyone who can make that happen!
-- 
William <wmorgan-sup at masanjin.net>


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-09-03 17:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-23 18:46 [sup-talk] [PATCH 1/2] preemptively load messages when scrolling Rich Lane
2009-08-23 18:46 ` [sup-talk] [PATCH 2/2] ui responsiveness tweaks Rich Lane
2009-08-26 21:15   ` Carl Worth
2009-08-27  2:54     ` Ingmar Vanhassel
2009-09-02  3:59   ` Rich Lane
2009-09-03 17:58   ` William Morgan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox