user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH 1/6] msgmap: minor cleanup to move constant declaration
  2015-09-21 11:11  6% [PATCH 0/6] more NNTP server updates Eric Wong
@ 2015-09-21 11:11  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2015-09-21 11:11 UTC (permalink / raw)
  To: meta

This doesn't actually change anything as the constant is still
usable in other subroutines, but helps with consistency and
readability IMHO.
---
 lib/PublicInbox/Msgmap.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/PublicInbox/Msgmap.pm b/lib/PublicInbox/Msgmap.pm
index 2f64d90..f285790 100644
--- a/lib/PublicInbox/Msgmap.pm
+++ b/lib/PublicInbox/Msgmap.pm
@@ -84,10 +84,10 @@ sub mid_insert {
 	$dbh->last_insert_id(undef, undef, 'msgmap', 'num');
 }
 
-use constant MID_FOR => 'SELECT mid FROM msgmap WHERE num = ? LIMIT 1';
 sub mid_for {
 	my ($self, $num) = @_;
 	my $dbh = $self->{dbh};
+	use constant MID_FOR => 'SELECT mid FROM msgmap WHERE num = ? LIMIT 1';
 	my $sth = $self->{mid_for} ||= $dbh->prepare(MID_FOR);
 	$sth->bind_param(1, $num);
 	$sth->execute;
-- 
EW


^ permalink raw reply related	[relevance 7%]

* [PATCH 0/6] more NNTP server updates
@ 2015-09-21 11:11  6% Eric Wong
  2015-09-21 11:11  7% ` [PATCH 1/6] msgmap: minor cleanup to move constant declaration Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2015-09-21 11:11 UTC (permalink / raw)
  To: meta

Always finding new bugs.  The XHDR Xref performance improvement
is pretty huge, and the XOVER speedup is noticeable as well.

We will begin to implement RFC 3977, AFAIK the latest NNTP RFC.

Eric Wong (6):
      msgmap: minor cleanup to move constant declaration
      nntp: speed up XHDR Xref for rtin
      nntp: speed up xover slightly
      t/nntpd.t: improve test runnability
      remove bytes:: for length checks
      nntp: proper UTF-8 support (hopefully?)

 lib/PublicInbox/Filter.pm     |  2 +-
 lib/PublicInbox/GitCatFile.pm |  5 +++--
 lib/PublicInbox/Msgmap.pm     |  2 +-
 lib/PublicInbox/NNTP.pm       | 47 ++++++++++++++++++++++++++++++++++++-------
 public-inbox-nntpd            |  4 ++--
 t/nntpd.t                     |  3 ++-
 6 files changed, 49 insertions(+), 14 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 --
2015-09-21 11:11  6% [PATCH 0/6] more NNTP server updates Eric Wong
2015-09-21 11:11  7% ` [PATCH 1/6] msgmap: minor cleanup to move constant declaration 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).