From 1ce564045c24b18919f7ec49d2459b7317190a0f Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 21 Feb 2012 10:56:38 -0500 Subject: [PATCH] Acq+Vandelay : more aggressive streamed response throttling With the addition of Vandelay processing, the server now wants to respond with status information a lot more often when uploading / process ACQ records. This patch applies the level of throttling to ACQ processing as Vandelay uses natively, which starts verbose and quickly cuts back on chatter as processing continues up to (currently) a throttle window of 1 delivered response per 256 responses. Apart from saving bandwith, this helps alleviate a known problem in the staff client where long-running, dense streams of multipart responses eventually stop bubbling up from the browser to the application. Making the responses more sparse seems to help this a lot. Signed-off-by: Bill Erickson Signed-off-by: Ben Shum --- Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm index 3fc3ef15a7..8baf9eaa7f 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm @@ -23,7 +23,7 @@ sub new { total => 0 }; $self->{cache} = {}; - $self->throttle(5) unless $self->throttle; + $self->throttle(4) unless $self->throttle; $self->{post_proc_queue} = []; $self->{last_respond_progress} = 0; return $self; @@ -48,6 +48,7 @@ sub respond { } $self->conn->respond({ %{$self->{args}}, %other_args }); $self->{last_respond_progress} = $self->{args}->{progress}; + $self->throttle($self->throttle * 2) unless $self->throttle >= 256; } sub respond_complete { my($self, %other_args) = @_; -- 2.11.0