Author: ab
Date: Tue Mar 7 01:26:54 2006
New Revision: 383829
URL: http://svn.apache.org/viewcvs?rev=383829&view=rev
Log:
Cache instances of ParsePluginList.
Modified:
lucene/nutch/trunk/src/java/org/apache/nutch/parse/ParserFactory.java
Modified: lucene/nutch/trunk/src/java/org/apache/nutch/parse/ParserFactory.java
URL:
http://svn.apache.org/viewcvs/lucene/nutch/trunk/src/java/org/apache/nutch/parse/ParserFactory.java?rev=383829&r1=383828&r2=383829&view=diff
==============================================================================
--- lucene/nutch/trunk/src/java/org/apache/nutch/parse/ParserFactory.java
(original)
+++ lucene/nutch/trunk/src/java/org/apache/nutch/parse/ParserFactory.java Tue
Mar 7 01:26:54 2006
@@ -55,7 +55,11 @@
this.conf = conf;
this.extensionPoint = PluginRepository.get(conf).getExtensionPoint(
Parser.X_POINT_ID);
- this.parsePluginList = new ParsePluginsReader().parse(conf);
+ this.parsePluginList =
(ParsePluginList)conf.getObject(ParsePluginList.class.getName());
+ if (this.parsePluginList == null) {
+ this.parsePluginList = new ParsePluginsReader().parse(conf);
+ conf.setObject(ParsePluginList.class.getName(), this.parsePluginList);
+ }
if (this.extensionPoint == null) {
throw new RuntimeException("x point " + Parser.X_POINT_ID + " not
found.");