XML Parsing far too slow. (How can I speed it up)

Hey everyone,
I am converting a site from ASP to JSP and there are a bunch of pages that parse an XML document display certain information from it. One problem is that the JSP implementation I have is far too slow. It takes ~6 seconds to load the page as we wait for it to process. I am using <x:parse> and <x:forEach> to process it using an XPath statement with the appropriate predicate ($dom/foo/bar/Route[ID > 999] for example)
One problems I think is the size of the XML document. All the data for different pages is pushed to the same XML file and we use maybe 5-10% of the data in any one parse. I have looked at XML filters a little bit but can't seem to find a good example or a clear explanation as to whether or not this will even solve my problem.
The root node has 5 children and the biggest one which takes up probably 3/4 of the document isn't even used by us.
My boss wants it to be as fast as the ASP implementation which was really fast. It is 100% custom and manually probes the XML document and can skip any children which it knows won't contain any leaf's we want (mainly that big one) and is nearly instant.
Does anyone have any ideas?
Thanks,
John

Hey guys, thanks for the responses and sorry it took so long to get back - I have been busy with school an all.
Well, first off let me say that everything in general seems far slower than what I would expect. I have eliminated different parts and everything I do eliminate seems to make is significantly faster. Does JSP seems relatively slow to you guys? I am serving it from a slower machine too but it just seems quite a bit slower than I would have expected and I don't feel I'll ever be able to match the speed of the ASP implementation.
However, I think there is light at the end of the tunnel. I believe I found the slowest part. Surprisingly, it is not the importing or even the parsing of the file. They seem like they could take at the very most 1/2 second and the whole file takes ~5 seconds to run. The part that is causing the most delay is the five x:set tags.
<x:set var="attrID"  select="string($r/ID)"/>is one of them. If I replace them with a piece of servlet code to assign dummy values instead, it cuts the execution by 80-90%.
Any ideas why these may be so slow?
Also, do you think switching to a servlet implementation would be better? I actually use some servlet code that I mean to convert over to tags once I get it working. Shouldn't the tags be about the same speed and are considered the "better" way to do things if possible?
Thanks again,
John

Similar Messages

  • Imac is way too slow-how can i speed it up

    I have been using my imac for over four years. Recently. it has really started to slow down.
    How can i run a diagnostic test to know what the problem is?

    Download, install and periodically run AppleJack[url]. This calls several unix routines including those which repair your directory and disk permissions, and cleans out extraneous cache and corrupted preference files.
    Consider reapplying the current combo updater for your OS. For Mac OS X 10.4.11, the intel package is available [url=http://support.apple.com/downloads/MacOS_X_10_4_11_Combo_Update__Intel]here. You must use this larger Combo updater and not the smaller Delta one to impact this issue.
    Consider reinstalling Safari 4.04 which is likely responsible for much of your perception that the machine is 'running slowly.'

  • My macbook Pro 15-Inch  2.4/2.2GHz Geheugen  2 GB 667 MHz DDR2 SDRAM is very slow how can i speed it up???

    My macbook Pro 15-Inch  2.4/2.2GHz Geheugen  2 GB 667 MHz DDR2 SDRAM is very slow how can i speed it up???
    Should i put new ram in????
    and if yes what should i buy????
    can anybody help me please 
    thx.

    You're welcome, j. If not enough free space availabe is the issue, now is a good time to upgrade to a much larger HD, as prices have never been better. Clear, illustrated directions are available at ifixit.com, macsales.com, powerbookmedic.com, youtube and others. Macsales, amazon and newegg have a nice selection of HDs, while the latter two also have lots of user reviews.
    Given that your MBP is 4-5 years old, and the average life-span of a HD is 3-5 years . . . .
    Given that you have a 17" MBP, you can install any capacity HD currently available, just make sure it's 2.5", SATA, and 12.5mm high or less (there's at least one Seagate monster out there that's 14-15mm high). All other things being equal, a 5400RPM HD is going to use less battery power, run cooler, quieter, and with less vibration, and, of course, run a bit slower than a 7200. An SSD is also a possibility (a very expensive one), but you're not going to see anywhere near the speed bump as newer machines due to the SATA 1 (1.5Gbps) SATA/HD bus bottelneck.

  • Laptop running too slow how can i run a clean up application or system check.

    My Laptop is running too slow and is constantly buffeting, how can i run some clean up software or a system check.

    If your Mac runs slowly:
    http://support.apple.com/kb/PH19031?viewlocale=en_US&locale=en_US
      Start up in Safe Mode. http://support.apple.com/kb/PH18760
    Reset SMC.     http://support.apple.com/kb/HT3964
    Choose the method for:
    "Resetting SMC on portables with a battery you should not remove on your own".
    Repair Disk
    Steps 1 through 7
    http://support.apple.com/kb/PH5836
    Run EtreCheck for a system report.
    https://discussions.apple.com/docs/DOC-6173
    FileVault encryption may make the Mac run slowly  after installing new version of OS X.

  • My iMac is running much slower how can I speed it up?

    I have an early 2009 iMac 24 inch.  I just ordered a pair of 4 gb ram upgrading to 8 gb from 4. What else can I do to get this thing to go faster? In its old age it's slowed down a bit. Please help.

    Model Name:          iMac
      Model Identifier:          iMac9,1
      Processor Name:          Intel Core 2 Duo
      Processor Speed:          3.06 GHz
      Number of Processors:          1
      Total Number of Cores:          2
      L2 Cache:          6 MB
      Memory:          4 GB
      Bus Speed:          1.07 GHz
      Boot ROM Version:          IM91.008D.B08
      SMC Version (system):          1.45f0
      Serial Number (system):        
      Hardware UUID:        

  • My imac is running slow how can i speed it up to where it was

    my intel based imac is getting increasingly slower and that spinning color wheel shows up all the time when using the computer for just about anything.
    additionally, i use mac's email program and its acting flaky, asking ror the password multiple times a week.

    1. How much RAM does it have and how full is your Hard Drive?
    2. Test your Hard Drive. > Intel-based Macs: Using Apple Hardware Test

  • My Software  Mac OS X Lion 10.7 is slow ,how can i speed it up...help

     

    Kappy's Personal Suggestions for OS X Maintenance
    For disk repairs use Disk Utility.  For situations DU cannot handle the best third-party utilities are: Disk Warrior;  DW only fixes problems with the disk directory, but most disk problems are caused by directory corruption; Disk Warrior 4.x is now Intel Mac compatible. TechTool Pro provides additional repair options including file repair and recovery, system diagnostics, and disk defragmentation.  TechTool Pro 4.5.1 or higher are Intel Mac compatible;  Drive Genius is similar to TechTool Pro in terms of the various repair services provided.  Versions 1.5.1 or later are Intel Mac compatible.
    OS X performs certain maintenance functions that are scheduled to occur on a daily, weekly, or monthly period. The maintenance scripts run in the early AM only if the computer is turned on 24/7 (no sleep.) If this isn't the case, then an excellent solution is to download and install a shareware utility such as Macaroni, JAW PseudoAnacron, or Anacron that will automate the maintenance activity regardless of whether the computer is turned off or asleep.  Dependence upon third-party utilities to run the periodic maintenance scripts had been significantly reduced in Tiger and Leopard.  These utilities have limited or no functionality with Snow Leopard or Lion and should not be installed.
    OS X automatically defragments files less than 20 MBs in size, so unless you have a disk full of very large files there's little need for defragmenting the hard drive. As for virus protection there are few if any such animals affecting OS X. You can protect the computer easily using the freeware Open Source virus protection software ClamXAV. Personally I would avoid most commercial anti-virus software because of their potential for causing problems.
    I would also recommend downloading the shareware utility TinkerTool System that you can use for periodic maintenance such as removing old log files and archives, clearing caches, etc.  Other utilities are also available such as Onyx, Lion Cache Cleaner, CockTail, for example.
    For emergency repairs install the freeware utility Applejack.  If you cannot start up in OS X, you may be able to start in single-user mode from which you can run Applejack to do a whole set of repair and maintenance routines from the commandline.  Note that AppleJack 1.5 is required for Leopard. AppleJack 1.6 is compatible with Snow Leopard. There is no confirmation that this version also works with Lion.
    When you install any new system software or updates be sure to repair the hard drive and permissions beforehand. I also recommend booting into safe mode before doing system software updates.
    Get an external Firewire drive at least equal in size to the internal hard drive and make (and maintain) a bootable clone/backup. You can make a bootable clone using the Restore option of Disk Utility. You can also make and maintain clones with good backup software. My personal recommendations are (order is not significant):
    Backuplist
    Carbon Copy Cloner
    Data Backup
    Deja Vu
    iBackup
    JaBack
    Silver Keeper
    MimMac
    Retrospect
    Super Flexible File Synchronizer
    SuperDuper!
    Synchronize Pro! X
    SyncTwoFolders
    Synk Pro
    Synk Standard
    Tri-Backup
    Visit The XLab FAQs and read the FAQs on maintenance, optimization, virus protection, and backup and restore.
    Additional suggestions will be found in Mac Maintenance Quick Assist.
    Referenced software can be found at CNet Downloads or MacUpdate.

  • Filtering a dataset Verry Slow how can I speed it up

    When doing a load from datasource to a UDMatrix on a UDF it is VERY slow
    line by line updating each cell etc etc with the result from an SQL Query.
    but a loadfromdatasource is Very quick is there a way to do a load from datasource with a filter? (i.e no query)
    and hence speed up the whole operation.
    Or am I using an incorrect method to load a Matrix..
    thanks
       George

    Hi
    try if this home version of like is useful for you
    if you want like "XX*"
    Set oCondition = oConditions.Add
        oCondition.BracketOpenNum = 2
        oCondition.Alias = "YourField"
        oCondition.Operation = co_graterEQUAL
        oCondition.CondVal = "XX"
        oCondition.BracketCloseNum = 1
        oCondition.Relationship = cr_AND
        Set oCondition = oConditions.Add
        oCondition.BracketOpenNum = 1
        oCondition.Alias = "YourField"
        oCondition.Operation = co_less_than
        oCondition.CondVal = "XZ"
        oCondition.BracketCloseNum = 2
    in theory with this you'll get all the values that begins with XX
    Hope it helps you
    Kind regards
    Salvador Biot

  • System extremely slow. how can i speed it up?

    I MAC speed is 2.8 GHz Intel Core 2 Duo, Memory is 4 GB 800 MHz DDR2 SDRAM. OS X 10.9.4 since downloading 10.9.4 extremely slow. Any remedies? also have  parallels for windows.

    EtreCheck version: 1.9.15 (52)
    Report generated September 18, 2014 at 9:08:38 AM CDT
    Hardware Information: ?
      iMac (24-inch, Early 2008) (Verified)
      iMac - model: iMac8,1
      1 2.8 GHz Intel Core 2 Duo CPU: 2 cores
      4 GB RAM
    Video Information: ?
      ATI Radeon HD 2600 Pro - VRAM: 256 MB
      iMac 1920 x 1200
      Cinema HD 1920 x 1200
    System Software: ?
      OS X 10.9.4 (13E28) - Uptime: 0 days 0:53:58
    Disk Information: ?
      Hitachi HDP725032GLA380 disk0 : (320.07 GB)
      S.M.A.R.T. Status: Verified
      EFI (disk0s1) <not mounted>: 209.7 MB
      Macintosh HD (disk0s2) / [Startup]: 319.21 GB (190.84 GB free)
      Recovery HD (disk0s3) <not mounted>: 650 MB
    USB Information: ?
      EPSON USB2.0 MFP(Hi-Speed)
      Apple Computer, Inc. Apple Cinema HD Display
      Apple, Inc. Keyboard Hub
      Apple, Inc Apple Keyboard
      Apple Inc. Built-in iSight
      Apple Inc. BRCM2046 Hub
      Apple Inc. Bluetooth USB Host Controller
      Generic USB Ear-Microphone
      Apple Computer, Inc. IR Receiver
    Gatekeeper: ?
      Anywhere
    Kernel Extensions: ?
      [not loaded] com.devguru.driver.SamsungACMControl (1.4.16 - SDK 10.6) Support
      [not loaded] com.devguru.driver.SamsungACMData (1.4.16 - SDK 10.6) Support
      [not loaded] com.devguru.driver.SamsungComposite (1.4.16 - SDK 10.6) Support
      [not loaded] com.devguru.driver.SamsungMTP (1.4.16 - SDK 10.5) Support
      [not loaded] com.devguru.driver.SamsungSerial (1.4.16 - SDK 10.6) Support
      [not loaded] net.pocketmac.driver.BlackberryUSB (3.0.12) Support
      [not loaded] net.pocketmac.driver.BlackberryUSBDev (3.0.12) Support
    Startup Items: ?
      ParallelsDesktopTransporter: Path: /Library/StartupItems/ParallelsDesktopTransporter
    Launch Daemons: ?
      [loaded] com.adobe.fpsaud.plist Support
      [loaded] com.ciscosystems.ciscoconnect.daemon.plist Support
      [running] com.parallels.mobile.dispatcher.launchdaemon.plist Support
      [loaded] com.parallels.mobile.kextloader.launchdaemon.plist Support
    Launch Agents: ?
      [not loaded] com.adobe.AAM.Updater-1.0.plist Support
      [loaded] com.parallels.mobile.prl_deskctl_agent.launchagent.plist Support
    User Launch Agents: ?
      [loaded] com.adobe.ARM.[...].plist Support
      [loaded] com.adobe.ARM.[...].plist Support
      [loaded] com.divx.agent.postinstall.plist Support
      [running] com.genieo.completer.download.plist Support
      [loaded] com.genieo.completer.update.plist Support
      [loaded] com.google.keystone.agent.plist Support
      [running] com.parallels.mobile.startgui.launchagent.plist Support
      [running] com.zeobit.MacKeeper.Helper.plist Support
    User Login Items: ?
      Garmin Express Service
      iTunesHelper
      KiesAgent
      EpsonRegReminder
      TuneupMyMac
      fuspredownloader
      EEventManager
    Internet Plug-ins: ?
      Google Earth Web Plug-in: Version: 6.1 Support
      Default Browser: Version: 537 - SDK 10.9
      Flip4Mac WMV Plugin: Version: 2.4.4.2 Support
      OfficeLiveBrowserPlugin: Version: 12.3.6 Support
      OVSHelper: Version: 1.1 Support
      AdobePDFViewerNPAPI: Version: 10.1.10 Support
      FlashPlayer-10.6: Version: 15.0.0.152 - SDK 10.6 Support
      DivXBrowserPlugin: Version: 2.1 Support
      Silverlight: Version: 5.1.20913.0 - SDK 10.6 Support
      Flash Player: Version: 15.0.0.152 - SDK 10.6 Support
      iPhotoPhotocast: Version: 7.0
      QuickTime Plugin: Version: 7.7.3
      AdobePDFViewer: Version: 10.1.10 Support
      GarminGpsControl: Version: 4.0.1.0 Release - SDK 10.4 Support
    Safari Extensions: ?
      Omnibar
      DivXHTML5
      OpenIE
    Audio Plug-ins: ?
      BluetoothAudioPlugIn: Version: 1.0 - SDK 10.9
      AirPlay: Version: 2.0 - SDK 10.9
      AppleAVBAudio: Version: 203.2 - SDK 10.9
      iSightAudio: Version: 7.7.3 - SDK 10.9
    iTunes Plug-ins: ?
      Quartz Composer Visualizer: Version: 1.4 - SDK 10.9
    User Internet Plug-ins ?
      Move-Media-Player: Version: npmnqmp 071500000273 Support
      Picasa: Version: 1.0 Support
    3rd Party Preference Panes: ?
      DivX  Support
      Flash Player  Support
      Flip4Mac WMV  Support
      MacFUSE  Support
    Time Machine: ?
      Time Machine not configured!
    Top Processes by CPU: ?
          7% mds
          2% WindowServer
          1% fontd
          0% EPSON Scanner
          0% aosnotifyd
    Top Processes by Memory: ?
      213 MB com.apple.WebKit.WebContent
      139 MB com.apple.IconServicesAgent
      123 MB mds_stores
      111 MB MacKeeper
      82 MB Safari
    Virtual Memory Information: ?
      1.62 GB Free RAM
      1.71 GB Active RAM
      146 MB Inactive RAM
      531 MB Wired RAM
      506 MB Page-ins
      0 B Page-outs

  • My laptop is slow, how can i speed it up?

    My laptop has continuosly crashed and is extremely slow. I'm constantly getting the rainbow circle for about 10 minutes every 5 minutes I'm online and i have to resend my data, a lot. My computer asks me if i want to submit files to report my slow computer but whether I hit yes or no nothing happens

    When you next have the problem, note the exact time: hour, minute, second.
    If you have more than one user account, these instructions must be carried out as an administrator.
    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Each message in the log begins with the date and time when it was entered. Scroll back to the time you noted above. Select the messages entered from then until the end of the episode, or until they start to repeat, whichever comes first. Copy the messages to the Clipboard by pressing the key combination command-C. Paste into a reply to this message (command-V).
    The log contains a vast amount of information, almost all of it useless for solving any particular problem. When posting a log extract, be selective. In most cases, a few dozen lines are more than enough. It is never necessary or helpful to post more than about 100 lines. "The more, the better" is not the rule here.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some private information, such as your name, may appear in the log. Anonymize before posting.

  • My 6500A prints photos far too dark - how do I get round this????

    My 6500A prints photos far too dark - how do I get round this???? I can't find any OBVIOUS way of controlling this.

    Same problem with the same printer here.
    When I send a photo from my phone (via ePrint) the result is not as clear as I would like.
    In addition to settings for brightness, I would also like to know if it's possible to change the size of the printed photo. (if you print a photo from windows you'll get a wizzard that lets you choose from different sizes)

  • HT5953 How can I speed up the "start speaking" feature in iBooks? (System Preferences Dictation and speech does not do anything to the speech speed.) The rate is a bit to slow.

    How can I speed up the "start speaking" feature in iBooks? (System Preferences Dictation and speech does not do anything to the speech speed.) The rate is a bit to slow.

    Hi, I had the same problem you described, and I noticed that there are two ways of activating text to speech on iBook for Mac, with different speed results (at least on my MacBook Pro Retina display)
    On your iBook you can select the text and and then click on > More> Start speaking,  and you will get a certain speed, which tends to be too slow.
    But you will get the speed you had selected with "Go to System Preferences>Dictation and Speech>Text to speech. In there is a slider to adjust the speaking rate." if you use the TOP MENU (next to the black apple)  under Edit>Speech>Start Speaking. I also learned that under System Preferences>Dictation and Speech>Text to speech, there is an option for a shortcut which is very helpful. And you can change Key. Hope this was helpful.

  • I did not deactivate a photoshop cs6 before there was a new hard drive installed with a Win7 Pro fresh install too. How can I activate photoshop on the new hardware if I can't deactivate it on the old hardware that is no longer available? Any help will be

    I did not deactivate a photoshop cs6 before there was a new "C" hard drive installed on my computer and a Win7 Pro fresh install too. How can I activate photoshop on the new hardware if I can't deactivate it on the old hardware that is no longer available? Any help will be appreciated.

    If it's the same machine (same CPU) there should not be any need to activate.  The actiovation is tied to your CPU.
    If you run into problems, then:
    Unfortunately, only Adobe customer service can assist you with your issue. These are user forums; you are not addressing Adobe here.
    Click on the link below, and after that click on "Still need Help? Contact us."
    Then on the next page, click Chat
    There is also a phone option. 1 (800) 833-6687
    http://helpx.adobe.com/contact.html?step=PHXS_downloading-installing-setting-up_licensing- activation

  • I share an iTunes account with my siblings. So their contacts appear on my phone too. How can I take it off?

    I share an iTunes account with my siblings. So their contacts appear on my phone too. How can I take it off?

    You can share the same Apple ID in
    Settings > iTunes & App Store > Apple ID: here
    But for all other Apple services like:
    FaceTime, iMessage, iCloud, etc, one of you should use a different Apple ID.

  • How can I speed up the extract() function queries on XML

    Hi,
    Please I need some light on xml and indexes.
    This is my case:
    I use Oracle 9i R2.
    I have a table with some rows containing some few xml documents (each row contains a big xml document).
    Given a value for an attribute of a tag, I want to extract the entire section within the tags.
    Example:
    <MYTAG number="1">
    .....big stuff here
    </MYTAG>
    <MYTAG number="2">
    .....big stuff here
    </MYTAG>
    <MYTAG number="x">
    .....big stuff here
    </MYTAG>
    So for number=2 I would like to extract from the document the xmltype
    <MYTAG number="2">
    .....big stuff here
    </MYTAG>
    I created an index and have followed all the steps from the XML Database Developers Kit manual. Then I would use extrac() as the document says.
    Now some doubts arised:
    Are these text/xml indexes only useful for getting the rowid of my document?
    I mean, if I select 'x' from the table looking for some value, then the index is used. But when I use extract in the select to get the section I look for, the query gets really low, specially when xml documents are big. I think when I have only row with one document, getting the rowid is not the problem, but the extraction from the document is.
    Is the extraction process faster because of the index?
    For what I see, the index only helps me to find the rowid, but then Oracle has to deal with the very big document inside the row. At that point Its oracle against a big text processing and index has nothing to do.
    How can I speed up the extraction of the section?
    If there any other index or tool for help extraction to be faster?
    I would appreciate to know what can I do. I need help on this.
    Thanks in advance!

    Well,
    - What indexes, if any, already exist?
    - What do the functions rl and nice do?
    - What are the current query plans?
    - How restrictive are the various predicates?
    - What version of Oracle?
    Justin

Maybe you are looking for

  • MSI K7N2 Delta-ILSR Dead? Help!

    Hey all, Well, the other day I was on my computer playing a game when my mobo fan started making an odd noise (as if switching rpm), so I took off the side of my case and took a look inside. Everything seemed to be functioning properly, then I switch

  • Partly reversing of Issued stock maintained in Batch

    Hi, I issued 100 Nos of stock to a cost center which is maintained in Batch, Now Cost center needs to return 50 Nos back to stock . While i am canceling material document,entire quantity(ie 100) is comming back to stock,But I need only 50 Nos back. H

  • Simple Substitution Cipher: What Went Wrong?

    I've written a simple program that enables a user to type in the name of a plain text file, then have the file encoding using a simple (+1)substitution cipher. The program compiles, but when the encoded file displays, it displays on the first charact

  • Buttons in AS3??????

    I used to use a script like this in a frame on the timeline to add functionality to my buttons. btn_01.onRelease = function(){ _root.targ_Main.loadMovie("oranythingelseineededthebuttontodo"); Now in AS3 I have no clue!!!!!!!!!! And apparently you hav

  • Add plant wise details in fk10n

    Hi all, Is there any report or transaction code which displays Vendor account by Company Code and a specific plant. I know FK10n but it displays the Vendor account Balance for the Company Code and not for the Plant and Company Code. Please Advise.Tha