Changeset 5820


Ignore:
Timestamp:
12/18/09 11:10:35 (2 years ago)
Author:
CrawfordCurrie
Message:

Item2511: another optimisation; if a plugin states NO_PREFS_IN_TOPIC, then there is no real need to search for the topic, just default to $systemWeb. That means $installWeb may be wrong in the initPlugin call if the plugin was not installed in the System web; but they are never installed anywhere else (AFAIK) so the search is probably pointless

Location:
trunk/core/lib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/core/lib/Foswiki.pm

    r5810 r5820  
    27552755 
    27562756                #print STDERR ' ' x $tell,"POP $tag\n"; 
    2757                 Monitor::MARK("Before $tag"); 
     2757                #Monitor::MARK("Before $tag"); 
    27582758                my $e = &$tagf( $this, $tag, $args, $topicObject ); 
    2759                 Monitor::MARK("After $tag"); 
     2759                #Monitor::MARK("After $tag"); 
    27602760 
    27612761                if ( defined($e) ) { 
  • trunk/core/lib/Foswiki/Plugin.pm

    r5791 r5820  
    352352 
    353353Find the web that has the topic for this plugin by searching the 
    354 {Plugins}{WebSearchPath} 
     354{Plugins}{WebSearchPath}. Returns undef if $NO_PREFS_IN_TOPIC=1 
    355355 
    356356=cut 
     
    359359    my $this = shift; 
    360360 
    361     unless ( $this->{topicWeb} ) { 
     361    unless ( defined( $this->{topicWeb} ) || $this->{no_topic} ) { 
    362362 
    363363        # Find the plugin topic, if required 
     
    373373            } 
    374374        } 
    375         ASSERT( $this->{topicWeb}, $this->{name} ) if DEBUG; 
    376     } 
    377     return $this->{topicWeb}; 
     375    } 
     376    # If there is no web (probably because NO_PREFS_IN_TOPIC is set) 
     377    # then default to the system web name. 
     378    return $this->{topicWeb} || $Foswiki::cfg{SystemWebName}; 
    378379} 
    379380 
  • trunk/core/lib/Foswiki/Plugins.pm

    r5810 r5820  
    171171    } 
    172172 
     173    # Uncomment this to monitor plugin load times 
    173174    #Monitor::MARK('About to initPlugins'); 
     175 
    174176    my $user;           # the user login name 
    175177    my $userDefiner;    # the plugin that is defining the user 
     
    200202        } 
    201203        $lookup{$pn} = $p; 
     204 
     205        # Uncomment this to monitor plugin load times 
    202206        #Monitor::MARK($pn); 
    203207    } 
Note: See TracChangeset for help on using the changeset viewer.