5 Replies Latest reply on Mar 22, 2011 2:25 AM by Andreas Jansson

    [CS5 Win] Switching to InDesign is slow in CS5 for certain documents. XML links?

    Andreas Jansson Level 2

      Hi,

       

      I put this question in the scripting part, since you might be the ones to notice such things as this, and it might relate to importing XML by scripting. Also I got no positive response in one of the other forums, "complaining" about the sluggish performance redrawing the interface when setting focus to InDesign CS5. But now I can more clearly see that it is not slow for all documents.

       

      Having certain documents open in InDesign CS5 makes it very slow to switch to. The CPU peaks at 80-100% and it takes about a second or two until InDesign responds.

       

      The documents do not necessarily need to be large in size, but it appears that it mostly occurrs on documents that I've imported data to (or that our customers have), using our own code, which takes care of an XML file and portions it out into templates.

       

      One strange thing I just noticed was that selecting "relink all" by alt-clicking the relink button in the Links palette, makes InDesign look for (presumalbly) previously imported XML files. How can that be?

      I never store any links to the imported XML - as far as I know. Where should I look for that kind of links?

      Capture.JPG

      How and why would previously imported XML file paths be stored? I just import the XML into the structure, "deal with it", and deletes the node that it was imported to. (The data is left in a structure that I build up myself.)

       

      Does anyone know if there is a change related to any of the facts stated above, in InDesign CS5?

       

      I'll attach a screen shot of the links dialogue (above), when it "looks for" an XML file. Could this kind of "missing file" cause the abovementioned "slowness" every time switching to InDesign from another application?

       

      (InDesign documents that don't relate to XML doesn't make switching to InDesign slow - but it gets slow when such a document is loaded, even under a tab that is not in focus.)

       

       

      Best regards,

      Andreas

        • 1. Re: [CS5 Win] Switching to InDesign is slow in CS5 for certain documents. XML links?
          Andreas Jansson Level 2

          I think I just discovered a bug. I'll file this as a bug at Adobes dedicated Feature / Bug report page:

           

          1. Create new document

          2. Import XML (as merge under root element - "create link" is NOT to be checked.)

          3. Place an image on page 1.

          4. Remove the XML file from the structure by pressing Delete on the top-most imported node.

          5. Send the imported XML file to the trash can.

          6. Select the image on page 1.

          7. In the links palette, press "Relink" while holding down Alt, to relink all missing links.

          8. Now InDesign asks for the XML file... the one that I previously imported as a non linked file.

           

          I would expect no relinking of an XML file that was never linked.

           

          This links collection is still "1", and that's the real image. No sign of the xml file there.

          app.activeDocument.links.length
          Result: 1

           

          I have no idea if this relates to the slow kind of documents that I experience. This simple test on a bland document did not result in slowness. I can still switch quickly from other applications to InDesign.

           

          [Bug report filed 20110120 15:50]

          • 2. Re: [CS5 Win] Switching to InDesign is slow in CS5 for certain documents. XML links?
            Andreas Jansson Level 2

            I've uploaded a video to demonstrate that InDesign sometimes can keep references to links:

            http://www.youtube.com/watch?v=OoQOSIlfYl4

             

            It's obvious that there are thousands of "orphans" in the documents. All XML files ever imported are kept in some way... The links (or the names of them) are obviously not removed from the document when deleting the Element in the XML Structure. Since the communication of the code with a database is built around XML import, the number of imported files is very large.

             

            Can these orphaned link references somehow be removed? When manually checking for missing files, InDesign loops though all of the XML files as seen in the YouTube video above, but ends up saying that there are no missing files. The next time I do the same check, all links are looped through again.

             

            Perhaps we should "link to file", using .xmlImportPreferences.createLinkToXML = true

            This propery has not been explicitly set, and therfore = false. But is there any way to get rid of all the old link names that's inside the document somehow?

             

            CS4 does the same thing, but there is "no 2 second lag time" switching from another application to InDesign CS4 with this kind of document open.

            • 3. Re: [CS5 Win] Switching to InDesign is slow in CS5 for certain documents. XML links?
              Andreas Jansson Level 2

              I have still no idea how to get rid of the tons of old links in the existing documents, other than to recreate the documents from scratch.

              At least with the createLinkToXML set to true, we seem to get no new XML link orphans.

               

              This internal storing of xml data had caused the documents to grow, from about 1-2 MB to 5-10 MB, and the multitude of orphaned (invisible) links caused indesign CS5 to respond slower. Since there is a setting to let InDesign store imported data inside the document, shouldn't there be a way to reference and delete these links as well, since they are not deleted when the XML-structure is cleared? I think it should.

              • 4. Re: [CS5 Win] Switching to InDesign is slow in CS5 for certain documents. XML links?
                Mayhem SWE Level 2

                Any difference by just doing a "save as" on one of these documents? We still have not received CS5 over here (damn cheapskate executives) but for CS3 and any previous version I've worked with InDesign keeps a whole bunch of unnecessary data like previews for links which are no longer in the document, doing a "save as" can sometimes reduce the file size by several orders of magnitude. (Don't use "save a copy" though as that seems to make an exact copy of the document's current state, including any and all unused resources.)

                • 5. Re: [CS5 Win] Switching to InDesign is slow in CS5 for certain documents. XML links?
                  Andreas Jansson Level 2

                  I tried it now (also unchecking the "Always save preview images with documents" checkbox). No difference. Closing the "saved as" document and opening it up again, the "orphans" are still there, when running the "Search for missing links" utility.

                   

                  Thanks for your the suggestions. (I don't envy your CS3, CS4 was such a big improvement when it came to performance, and just the wrong version to jump over as I see it, but some of our customers did the same thing.)