vgritsenko    2002/10/21 19:51:29

  Modified:    src/java/org/apache/cocoon/generation Tag:
                        cocoon_2_0_3_branch FragmentExtractorGenerator.java
  Log:
  reduce time in synchronized block
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.7.2.1   +5 -6      
xml-cocoon2/src/java/org/apache/cocoon/generation/Attic/FragmentExtractorGenerator.java
  
  Index: FragmentExtractorGenerator.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/generation/Attic/FragmentExtractorGenerator.java,v
  retrieving revision 1.7
  retrieving revision 1.7.2.1
  diff -u -r1.7 -r1.7.2.1
  --- FragmentExtractorGenerator.java   22 Feb 2002 07:03:51 -0000      1.7
  +++ FragmentExtractorGenerator.java   22 Oct 2002 02:51:29 -0000      1.7.2.1
  @@ -129,20 +129,19 @@
           // Obtain the fragmentID  (which is simply the filename portion of the 
source)
           getLogger().debug("FragmentExtractorGenerator retrieving document " + 
source + ".");
   
  +        Document doc = null;
           synchronized (FragmentExtractorGenerator.fragmentStore) {
  -            Document doc = (Document) 
FragmentExtractorGenerator.fragmentStore.get(source);
  -
  +            doc = (Document) FragmentExtractorGenerator.fragmentStore.get(source);
               if(doc == null)
                   throw new SAXException("Could not find fragment " + source + ".");
   
  -            DOMStreamer streamer = new 
DOMStreamer(this.contentHandler,this.lexicalHandler);
  -
  -            streamer.stream(doc);
               // Fix for commandline generation.
               // Don't cleanup the store if we are in LINK_VIEW
               if(cleanupStore)
                   FragmentExtractorGenerator.fragmentStore.remove(source);
           }
  +        DOMStreamer streamer = new DOMStreamer(this.contentHandler, 
this.lexicalHandler);
  +        streamer.stream(doc);
       }
   
       public static String store(Document doc) {
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to