* [PATCH 3/3] ds: long_step: eliminate redundant fileno call
2023-11-25 20:54 6% [PATCH 0/3] ds: event loop-related fixes Eric Wong
@ 2023-11-25 20:54 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2023-11-25 20:54 UTC (permalink / raw)
To: meta
We already stash the associated FD for reporting at startup and
don't need to call `fileno' again. Found via manual code
inspection while considering the effort to make async {forward}
from PublicInbox::HTTP more like the generic long_response API
and {long_cb} field used by IMAP/NNTP/POP3.
---
lib/PublicInbox/DS.pm | 1 -
1 file changed, 1 deletion(-)
diff --git a/lib/PublicInbox/DS.pm b/lib/PublicInbox/DS.pm
index 4c8b502f..8bc8cfb7 100644
--- a/lib/PublicInbox/DS.pm
+++ b/lib/PublicInbox/DS.pm
@@ -629,7 +629,6 @@ sub long_step {
delete $self->{long_cb};
$self->long_response_done;
my $elapsed = now() - $t0;
- my $fd = fileno($self->{sock});
$self->out(" deferred[$fd] done - %0.6f", $elapsed);
my $wbuf = $self->{wbuf}; # do NOT autovivify
requeue($self) unless $wbuf && @$wbuf;
^ permalink raw reply related [relevance 7%]
* [PATCH 0/3] ds: event loop-related fixes
@ 2023-11-25 20:54 6% Eric Wong
2023-11-25 20:54 7% ` [PATCH 3/3] ds: long_step: eliminate redundant fileno call Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2023-11-25 20:54 UTC (permalink / raw)
To: meta
Eric Wong (3):
http: fix HTTP/1.1 pipelining during long async requests
select+poll: have caller retry on EINTR
ds: long_step: eliminate redundant fileno call
lib/PublicInbox/DS.pm | 1 -
lib/PublicInbox/DSPoll.pm | 6 ++--
lib/PublicInbox/HTTP.pm | 17 +++++-----
lib/PublicInbox/Select.pm | 6 ++--
xt/httpd-async-stream.t | 68 +++++++++++++++++++++++++++++----------
5 files changed, 65 insertions(+), 33 deletions(-)
^ permalink raw reply [relevance 6%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2023-11-25 20:54 6% [PATCH 0/3] ds: event loop-related fixes Eric Wong
2023-11-25 20:54 7% ` [PATCH 3/3] ds: long_step: eliminate redundant fileno call Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).