Changeset 11966


Ignore:
Timestamp:
2006-06-27T12:07:27+12:00 (18 years ago)
Author:
mdewsnip
Message:

(Profiling) Creating new textcat objects (one for each plugin) is slow, and often unnecessary. Textcat objects are now only created before they are used.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/plugins/BasPlug.pm

    r11880 r11966  
    407407    $self->{'plugin_type'} = $plugin_name;
    408408    #$self->{'outhandle'} = STDERR;
    409     $self->{'textcat'} = new textcat();
    410409    $self->{'num_processed'} = 0;
    411410    $self->{'num_not_processed'} = 0;
     
    11131112
    11141113    # get the language/encoding
     1114    $self->{'textcat'} = new textcat() if (!defined($self->{'textcat'}));
    11151115    my $results = $self->{'textcat'}->classify(\$text);
    11161116
Note: See TracChangeset for help on using the changeset viewer.