Skip to content

Commit

Permalink
Item14111: performance and memory fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDaum committed Jul 11, 2016
1 parent 44a614d commit 977897b
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 13 deletions.
15 changes: 8 additions & 7 deletions .gitignore
@@ -1,8 +1,9 @@
*.swp
DBCachePlugin.md5
DBCachePlugin.sha1
DBCachePlugin.tgz
DBCachePlugin.txt
DBCachePlugin.zip
DBCachePlugin_installer
DBCachePlugin_installer.pl
*,v
/DBCachePlugin.md5
/DBCachePlugin.sha1
/DBCachePlugin.tgz
/DBCachePlugin.txt
/DBCachePlugin.zip
/DBCachePlugin_installer
/DBCachePlugin_installer.pl
1 change: 1 addition & 0 deletions data/System/DBCachePlugin.txt
Expand Up @@ -454,6 +454,7 @@ automatically from there on.
---++ Change History

%TABLE{columnwidths="7em" tablewidth="100%"}%
| 11 Jul 2016: | make use of clean-up feature of latest <nop>DBCacheContrib; performance improvements |
| 08 Mar 2016: | fixed use of uninitialized variable in sorting code; \
add support for Inheritance field in Foswiki:Extensions/WikiWorkbenchContrib;\
added =warn= parameter to all macros to switch off warnings optionally; \
Expand Down
4 changes: 2 additions & 2 deletions lib/Foswiki/Plugins/DBCachePlugin.pm
Expand Up @@ -25,8 +25,8 @@ use Foswiki::Plugins();
#Monitor::MonitorMethod('Foswiki::Contrib::DBCachePlugin::Core');
#Monitor::MonitorMethod('Foswiki::Contrib::DBCachePlugin::WebDB');

our $VERSION = '9.20';
our $RELEASE = '09 Mar 2016';
our $VERSION = '9.30';
our $RELEASE = '11 Mar 2016';
our $NO_PREFS_IN_TOPIC = 1;
our $SHORTDESCRIPTION = 'Lightweighted frontend to the <nop>DBCacheContrib';

Expand Down
5 changes: 4 additions & 1 deletion lib/Foswiki/Plugins/DBCachePlugin/Core.pm
Expand Up @@ -414,14 +414,17 @@ sub handleDBQUERY {
my @result = ();
if ($theFormat && $hits) {
my $index = $hits->skip($theSkip);
my $lastWeb = '';
my $theDB;
while (my $topicObj = $hits->next) {
#writeDebug("topicName=$topicName");
$index++;

my $topicName = $topicObj->fastget("topic");
my $web = $topicObj->fastget("web");
$web =~ s/\//./g;
my $theDB = getDB($web);
$theDB = getDB($web) if !$theDB || $lastWeb ne $web;
$lastWeb = $web;
unless ($theWeb) {
print STDERR "ERROR: no such web $theWeb in DBQUERY\n";
next;
Expand Down
2 changes: 1 addition & 1 deletion lib/Foswiki/Plugins/DBCachePlugin/DEPENDENCIES
@@ -1,4 +1,4 @@
Foswiki::Contrib::DBCacheContrib,>=4.00,perl,Required
Foswiki::Contrib::DBCacheContrib,>=4.10,perl,Required
Time::ParseDate,>=2003.0211,cpan,Required
Storable,>=2.07,cpan,Required
Sereal,>=3.00,cpan,Optional
2 changes: 1 addition & 1 deletion lib/Foswiki/Plugins/DBCachePlugin/WebDB.pm
Expand Up @@ -97,7 +97,7 @@ sub onReload {

# get meta object
my ($meta, $text) = Foswiki::Func::readTopic($this->{web}, $topic);
my $origText = $text;
$this->cleanUpText($text);

# SMELL: call getRevisionInfo to make sure the latest revision is loaded
# for get('TOPICINFO') further down the code
Expand Down
2 changes: 1 addition & 1 deletion lib/Foswiki/Plugins/DBCachePlugin/build.pl
@@ -1,4 +1,4 @@
#!/usr/bin/perl -w
#!/usr/bin/env perl
#
# Build for DBCachePlugin
#
Expand Down

0 comments on commit 977897b

Please sign in to comment.