Slow Page Draws

Ok here is the problem when ever I add a SELECT statement to my code it just gets slower and slower. Without the SQL statement it takes less than 1 second to draw the page, with the statement it is taking over 3 seconds. For every Sql statement I add to the page it takes about 2-3 seconds longer to draw so 3 Select statements would take almost 10 seconds to draw tha page. All of this is running locally on a Win2003 Web Ed. Server running Tomcat 5.0.24 and MySQL version 4.x. Here is the code
<%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c' %>
<%@ taglib uri='http://java.sun.com/jsp/jstl/sql' prefix='sql' %>
<%@ taglib uri="/WEB-INF/rssutils.tld" prefix="rss" %>
<sql:setDataSource var="dataSrc2" driver="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/hrp?autoReconnect=true"  user="root"  password="password" />
<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
<!-- splash.jsp    -->
<!-- Release:     5.0.7.8 -->
<html>
<body>
<table border="0" cellspacing="0" cellpadding="2" bordercolor="black"  width = "750" height="300">
     <TR>
          <TD valign="top" width="50%">
               <table border="0" cellspacing="0" cellpadding="2" bordercolor="red"  width="100%">
                    <TR>
                         <TD valign="top" width="100%"><B>Industry News & Information</B><BR><BR>
                              <rss:feed url="http://www.microsite.reuters.com/rss/businessNews"feedId="example3"/>
                         <table>
                           <tr>
                             <td width="79%" valign="top">
                                   <ul> 
                                        <rss:channelImage feedId="example3" height="16" width="72"/>  <font face="Arial, Helvetica, sans-serif" color="#808080" size="1"><rss:channelTitle feedId="example3"/></font><br>
                                        <rss:forEachItem feedId="example3" startIndex="0" endIndex="5">
                                             <li><a href='<rss:itemLink feedId="example3"/>' class='navlink' target="_cnn"><rss:itemTitle feedId="example3"/></a></li>
                                        </rss:forEachItem>
                                   </ul>
                              </td>
                           </tr>
                         </table><BR><BR>
                    </TR>
                    <TR>
                         <TD valign="top" width="100%"><B>Industry Quick Links</B>
                    <c:set var="catid" value="${param.catid}" scope="page" />
                    <c:if test="${empty catid}">
                         <c:set var="catid" value="0" scope="page" />
                    </c:if>
                    <sql:query var="CatalogName" dataSource="${dataSrc2}">
                       select * from linkexcatalog where parentid= ${catid} order by catalogname
                    </sql:query>
                    <ul>
                    <c:forEach var='row' items='${CatalogName.rows}'>
                         <li><a href = 'er_link.jsp?catid=<c:out value='${row.catalogid}'/>' class="navlink"><c:out value='${row.catalogname}'/></a></li>
                    </c:forEach>     
                              </ul>
                         </TD>
                    </TR>
               </TABLE>
          </TD>
     </TR>
</TABLE>Any help or pointers would be greatly appreciated.

Ok here is the problem when ever I add a SELECT statement to my code it just
gets slower and slower. Well what would you expect?
You are adding
1 - database processing time
2 - jsp code accessing the data
3 - page rendering.
My guess is that the time will mainly be spent on the database processing. Looking at your page, you don't seem to be doing much more than spitting the data straight back out.
Couple of things to speed things up
1) Use database connection pooling.
Currently every time you run the page it creates a new connection to the database. This is quite a bit of overhead in the scheme of things.
The easiest way is to set up a JNDI datasource in Tomcat:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html
However instead of modifying server.xml like that page says, I prefer adding the resource tags into a context.xml file as specified here:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/context.html
The settings remain exactly the same, just they are in a different file.
You then change your setDataSource tag to use this JNDI name
eg
if you created a resource under the name: hrpData
<sql:setDataSource var="dataSrc2" dataSource="hrpData"/>2) Tune your queries.
select * from linkexcatalog where parentid= ${catid} order by catalogname
consider indexing the table linkexcatalog to speed up the query. An index on parentid field would let the query run faster.
3)
I am also a fan of using prepared statements and the <sql:param> tag rather than putting the ${catId} parameter directly into the query. That also might make it more efficient.
Hope this helps some,
evnafets

Similar Messages

  • Slow page rendering due to a LOV!

    I was trying to figure out what the cause of my slow page rendering was and looking at the debug results I figured for one of my page items which is a LOV I get:
    0.18800     13.98400     ...Session State: Save "P2_CATEGORY" - saving same value: "4"consistantly taking around 14 seconds.
    I have even simplified the LOV to type static, and it only has 6 values. There is only one computation for this item which is static assignment only when the value of item is null.
    I'm wondering if it's the item being saved in session really which is taking all this time or something else could be causing it to run slow. I mean, can the debug results be misleading me?
    I'm using Apex 4.1 and Oracle 11g. I have 40 Shared_servers set.
    I would appreciate any hints.

    Hi,
    set partialSubmit=true on the button
    Frank

  • Dreamweaver CS6 and CC both very slow page rendering under Mavericks

    Dreamweaver CS6 and CC both very slow page rendering under Mavericks compared to 10.8.5
    Any ideas?

    One other thing I am seeing:
    When I open any document (html, javascript) inside DWCC now, then close it without any changes, DW asks if I want to save changes.
    I just tested this under 10.8.5 and there is no lag there, nor are documents mysteriously modified when opened.
    Note: I have tested this both with and without other Apps or extensions running in Mavericks and 10.8.5

  • Premiere Elements 10 Trial Slow To Draw Timeline

    Problems with Premiere Elements 10 Trial being slow to draw the timeline when scrolling up or down or sideways.
    One fix I've read said to "disable desktop composition" in the Compatibility tab of the Properties window from the PE shortcut icon.
    But the option is grayed out.
    My spec's:
    Windows 7 64 bit
    i7 2600K
    16GB RAM
    NVIDIA GTX 460
    850 Watt PSU
    SSD System and Programs Drive
    Can't figure out why it's not letting me choose that option.
    Any ideas for a fix?
    Thanks!

    What model of camcorder is your original video coming from and what format is it?
    When you started your Premiere Elements project, which project settings did you select? If you've selected the proper settings for your source video, you will NOT see red lines above the clips when you add them to your timeline. Is that the case in your project?
    Also, have you run Advanced System Care Free on your system? Brand new systems can be a mess of fragmentation and temp files. This great little one-click program can clean up and optimize your machine and often clears up "invisible" issues. And it's free. I've used it every week for years, and my 6 year old computer still runs better than the day I bought it.
    http://www.iobit.com/advancedsystemcareper.html

  • Odd Draw Behavior - Slow Ellipse2D Draw

    Summary:
    A game I have written uses bitmaps and lots of Ellipse2Ds. The Ellipses are in the background and occasionally need to all be redrawn (there could be many - let's say 100 at a time). This works fine on a Windows box, and Macs from G3 - current Intels. When I attempt to run the application full screen under X11 drawing the Ellipses takes too long, making the animation appear choppy. Running Java 5.0 under Debian.
    Question
    I am looking for suggestions on how to tweak this and/or a work around.
    Details
    I have tried -Xmx256M -Xsx256M switches (makes no diff). I am using a descent video card on the system. The Ellipse2Ds are drawn on top of a buffered image (as are the bitmaps). Garbage collection does not seem to be the issue. The processor is a little slower - its a VIA mini ITX - details here ...
    http://www.hardwareinreview.com/cms/content/view/44/1/
    I understand that it could be the hardware ... but just in case ... feedback appreciated.

    I don't think it's very odd at all. On some of my computers windows runs fine, but anyn version of Linux is slow at drawing in comparison. I think this has to do with the state of the ATI drivers Linux has. Check out Phoronix for more information on the state of various graphics drivers in Linux.
    Hopefully some nice Linux developer somewhere will drastically improve the performance of all video drivers. :)

  • Safari Crashes - says it cannot find pages then finds it or retry. recd notice of crash once with data page for submission but send attempts were failed.  slow page changes.  norton finds nothing.

    - says it cannot find pages then finds it or retry. recd notice of crash once with data page for submission but send attempts were failed.  slow page changes.  norton finds nothing.

    I would suggest that you uninstall Norton.
    Norton does nothing useful on a Mac.
    Norton is know to cause damage to Macs.
    Allan

  • Slow page loads only since 10.4 upgrades

    Hi folks,
    Has anyone seen a problem with pages hanging up after updating from earlier OS X's to 10.4? First my wife noticed it when she got her new Mac Book -- an upgrade from 10.2.8 on the old machine. A couple of items would load on a page, but then it hangs up and stalls for a while until finally fully loading. Ordinarily, I'd peg it as just being slow serving of ads to particular sites, but it's not always ad-rich sites. And more so, it's strange that this only started happening in conjunction with starting to use 10.4 to surf the same sites that weren't hanging up before.
    Further confirming my belief that it has to do with 10.4, is that upon my upgrading from 10.3 to 10.4 on my G5 a month or so later, I started to immediately notice slow, slow page loads on that machine, too. Particularly, again, on sites that loaded fine with 10.3 just before the upgrade.
    I'm also having more problems with mailboxes loading slowly and kicking off-line since the upgrade.
    Is there some trick to get 10.4 to behave with regard to requests across the web??
    Thanks!!!!
    G5 Dual 1.8   Mac OS X (10.4.7)   Focusrite Saffire Audio Interface

    me too. My mini is wired, but I have the same trouble. I have a PC on the same router, and it has no problem with internet. I've been looking around a while, and it seems like this is a common occurrence and I have not found a fix yet. This is very frustrating. Also, the network status in the network diagnostics window shows the internet failing alot, but even when it's "green" I still can't always load pages.

  • Slow page loading / Time outs

    Hi guys,
    I am getting very slow page loading times. This only started to happen today, before this my connection has been solid.
    I have reset the router, all the other PCs in my house are having the same problem. I am not running any P2P/Downloading software.
    Speedtest says I am connected at 12MBPs. It takes me a very long time to load a page and most of the time they just time out.
    Router stats -
    ADSL settings
    VPI/VCI 0/38
    Type PPPoA
    Modulation ITU-T G.992.5
    Latency type Interleaved
    Noise margin (Down/Up) 3.6 dB / 5.7 dB
    Line attenuation (Down/Up) 29.5 dB / 12.7 dB
    Output power (Down/Up) 0.0 dBm / 12.9 dBm
    Cheers

    Keith_Beddoe wrote:
    There appears to be a problem with the BT DNS servers at the moment. They keep going offline.
    Hopefully someone is aware and dealing.
    Which ones are you using ?  BT have LOTS of machines providing DNS services
    I'm currently using:
    Primary: 194.72.9.38
    Secondary: 194.72.0.114
    ...and haven't really noticed anything untoward all day, and I've been online and active for most of the day. Not much longer though - soon finished, then it's beer
    I have seen quite a few reports of slow loading pages etc elsewhere though.

  • Very SLOW Pages 09 when not connectec to the Internet. !!!

    Hi:
    Im Writing a document that has the following Stats:
    words: 7,279
    Pages: 32
    Lines: 689
    Paragraphs: 164
    Sections :10
    Grapics: 2
    Characters: 46,916
    Character No spaces: 39,831
    It also contains a content table.
    The thing is today I had no internet at my house and I noticed that pages '09 was Very SLOW openning and Saving My document. I tried with other documents and they all behave as the one described before.
    I Describe the document because I have seen posts here of slow pages due to document structure. But I dont think this is document related because it happened it all the documents i opened and even just loading pages. My machine was as allways, all the programs running great except Pages.
    I also noticed that when Arrived at work and connected to the internet the Slowliness had ENDED.
    Anyone knows what is happening??

    PeterBreis0807 wrote:
    Pages links to the Net for:
    1 Updates
    once a month.
    2 Help
    the first time we enter the help in a working session
    3 The links in the startup screen.
    I never used such an item.
    There are ways to stop this behavior. The best is to use *Little Snitch* which allows you to stop certain connections being made. Basically when the attempt to connect is made, *Little Snitch* intercepts it and lets you choose: Allow, Allow once, Disallow once, Disallow forever.
    4 Users who had *Little Snitch* also noticed that Pages '09 was trying to connect to a web advertising site. Why this happens, ask Apple.
    Too late, Apple removed the task
    Yvan KOENIG (from FRANCE jeudi 19 février 2009 15:56:53)

  • Slow page loads over LAN with 500GB TC

    Hello,
    Forgive me if this has already been touched on, I tried to run through the first six pages and didn't see anything that I thought matched my problem. I saw that there were reports of slow wireless speeds, but I have been experiencing problems over the wired connection to my TC
    I have a MBP connected to the TC wirelessly and a Mac Pro with a wired connection to the TC. They both render similar speeds in a speed test ~4Mbits down, but on my Mac Pro, I get excruciatingly slow page loads. Pages often take, on average, 15-20 seconds to come up at all, and some more time to finish loading completely. Meanwhile, I can load the same pages in a few seconds with my MBP over the wireless network.
    My cable coming from the TC to my Mac Pro is brand new, its at least CAT5e, and should be able to handle my down speeds without a problem. So I'm at a loss for what could be causing this. Could it be something with the computer and not the TC at all?
    Thanks,
    Scott

    Well, creating a test user put me on the right path. Deleting the systemconfiguration folder did not help, but I deleted the following files out of the $user/library/preferences folder:
    com.apple.internetconfig.plist
    com.apple.internetconfigpriv.plist
    com.apple.internetconnect.plist
    com.apple.networkConnect.000a27b47970.plist
    com.apple.preference.internet.plist
    com.apple.PrefPane.Network.000a27b47970.plist
    Basically any preference with "Network" or "Internet" in it and everything sped up immediately. Thanks for the help.

  • S4 slow page load and email wont receive auto

    I got the s4 1 week ago came from an iphone, so far not impressed! Slow page load time and email although set automatic wont load. phone is very slow! what should I do?

        Hello G433062,
    Have no fear Verizon is here! I am so sorry that you are having an issue with the Samsung S4 opening page slowly. We want you love your phone! Has this been an issue when you are using the Internet application? Or is it slow at opening any application? Have you tried to clear the history: http://vz.to/1g2WXjg Please keep us posted.
    KevinR_VZW
    Please follow us on Twitter @VZWSupport

  • FCP Mutitrack Send - Waveforms SLOW to Draw/Crossfades Not Visible

    I've been using Soundtrack Pro for about six months now to mix/sweeten audio from my FCP projects with great success.
    It's been a month or so since I've used it last, and today when I send a FCP sequence to Sountrack Multitrack, not only do the waveforms draw at a painfully slow pace, but I'm not seeing my audio crossfades or keyframe audio levels from my FCP sequence.
    I have NO idea why the waveforms are so slow to draw, but my bigger question is whether there is a way to view my keyframe overlays from FCP in soundtrack as I mix. Or am I just imagining that I used to be able to see them?

    I'm an idiot -- I just wasn't pulling down the envelopes for the individual tracks to see my keyframes there.
    Although I always find that Soundtrack's importing of those keyframed audio levels can be slightly off by a few frames sometimes.
    Now I still have NO idea why the waveforms aren't drawing on some clips. About 1/3 of my multitrack file has waveforms drawn, but they're scattered across the timeline in no particular order.
    One thought I had was perhaps this is due to the fact that these little clips put together each belong to a DV video file roughly 13GB (57 min) in size. Even on a FW 800 connection, maybe that's why they're not drawing? STP is the only large program open, and according to iStat I have about 1GB of free ram and 85% free CPU.

  • Slow page printing

    For each page that's printed there's a lot of sound that comes from the printer. It sounds like the paper feed mechanism is turning on and off and the ink jet carrier is moving back and forth. This goes on for a long time then the page will print. Then the same thing happens for the next page. I've verified that the printer is directly connected to wall power, I've hard reset the printer by removing the power cord and reinserting it, I've reinstalled the printer driver, and I've verified that the printer firmware is the current version. If I try to copy a document I get a "paper size mismatch" error with a blank copy ejected and the page to be copied is not pulled in by the document feeder. I have no idea how the printer gets that idea. The paper I'm using is standard 8.5 x 11 paper and I've done nothing to set some non-standard size.

    Thanks. The pages are pretty simple except for a lot of text. I had tried printing it as a bitmap but that didn't seem to help. Do you mean using the addPage printJobOptions parameter? Or do you mean drawing them to a bitmapdata kind of thing?
    The slowness doesn't seem to be in the Flash processing part. The print dialog comes up quickly and then while I watch my print monitor I'll see all the pages showing up -- it'll say "printing 1/6." It just seems to take forever to spool to the printer. Much longer than if I print from something like Word or my browser, and those pages are usually far more complex that what I'm sending from Flash.
    I don't expect that it will be super quick, but it just seems like there is something going on. And I'm not even sure where to look.

  • Preview - very slow re-draw

    HI all
    One thing I've noticed in leopard is the new preview is very slow to re-draw when I have multiple image files loaded in. As a hit the next arrow it forms the next pic in big slow blocks unlike the previous preview that switched smoothly no matter how large the images were.
    Has anyone else experienced this

    I opened the pdf guide which is on the Leopard install disc. The whole machine went into a mini freeze state and then it eventually loaded. In tiger I have opened pdf's that were over 300mb in size and whilst there was an initial load it did then populate each page.
    I'm sure its just a glitch to be worked out and will be addressed in 15.1 update.

  • Here is a very slow page in Safari 5.1

    Safari before 5.1 has had no problem loading this page:
    http://panlex.org/u
    But in 5.1 requesting this page makes WebProcess start consuming 100%+ of CPU and it takes 105 seconds under Snow Leopard on a 2 x 2.8 GHz Quad-Core Xeon Mac Pro and 65 seconds under Lion on a 2.3 GHz Intel Core i7 MacBook Pro, before the page is ready to do anything (scroll or press a button) with.
    To check whether there might be a font or character causing this problem, I have replicated the situation with various subsets of the table being displayed. Displaying 1000 rows speeds the loading, but it still takes about 15 seconds on the Snow Leopard machine, regardless of which 1000 rows are displayed. (These times are over a LAN, so no Internet latency.) Similar problem on a 2.4 GHz Intel Core 2 Duo MacBook.
    The loading time is not appreciably decreased if the page is loaded again in succession.

    Thanks for helping diagnose this.
    However, my testing indicates that this is not a bug with border-collapse: collapse. Here is why:
    If I change the value of border-collapse to "separate" and add "border-spacing: 0", the bug remains. To try this, request http://www.panlex.org/cgi-bin/plxu28-bug2.cgi .
    If I leave the value of border-collapse unchanged but change the button elements in the cells to plain text, the bug disappears. To try this, request http://www.panlex.org/cgi-bin/plxu28-bug1.cgi .
    On the basis of this testing, it would seem to me that the bug is dependent on the button elements and independent of the border-collapse CSS attribute.
    This doesn't explain, however, why you have found border-collapse: collapse producing slow results with other large tables and it doesn't do so with my table in http://www.panlex.org/cgi-bin/plxu28-bug1.cgi . It also doesn't explain why you saw the bug disappear when you changed border-collapse on my page but I didn't see it disappear.
    Any further diagnostic help would be welcome.

Maybe you are looking for

  • How to send the entire binary file as Content in mail adapter

    Hi, I have the below scenario: A binary file is there on the XI server and this is more than 1 lines. This file needs to be sent across to certain email addresses via the XI interface. I have made the design and config and now get the the mail but so

  • Problrem running ADF 11g App LocalHost URL vs IP URL

    Hi all, we are using Jdeveloper 11.1.1.5 and ADF to develop or app. The issue happens in some machines, but not in others. All of them use Windows 7 Pro 32 bit, same updates, etc. We've checked IE9 configuration (must be IE) and is the same in all ma

  • How do I FTP my webpages to my .mac account?

    I am creating my site in iweb '08 and publishing to a folder. I would prefer to FTP my site into my dotmac account and into my idisk. I have tried ftp.apple.com/dotmac and idisk.mac.com/username-Public. Im just not sure what the address is at this po

  • Problem with a display lighting

    Problem with a display lightring. What is it and how can I solve it? Thanks! Mikhail

  • Using my new IMAC to finish creating a Google-obtained website

    Hi - I bought my new IMAC last week. A couple months back, when I was still using my old PC, I purchased a website domain through Google (via BigDaddy.com). I started construction on this new website though Google, but I didn't finish because my anci