Slow performance while charging

I've recently installed a Pass & Seymour model TM8-USBWCC6 wall charger in my home. It provides two USB ports with 5VDC 2.1 amp charging ability. When connecting an iPhone 5 and iPhone 5s, performance on the phones greatly decreases. I have only tested with these two devices. I tend to use my iPhone while charging but I can't even do that anymore because of how slow it runs. Any thoughts as to what can be causing this? I am using an Apple lightning cable. The charging itself appears to be running fine with no errors.

Try the SMC and PRAM resets again:
http://support.apple.com/kb/HT3964
http://support.apple.com/kb/ht1379
Maybe you will be lucky.
Run an Apple Hardware Test.  Perhaps that will give a clue.
http://support.apple.com/kb/ht1509
Ciao.

Similar Messages

  • Slow performance while charging MacBook Pro 2011

    What I'm experiencing currently is a massive drop in performance while the laptop is plugged in and charging. Running anything CPU intensive like music production software or gaming causes massive spikes within 5 minutes of doing a task, and eventually leads the application to a pretty non-responsive state.
    As soon as the light on the MagSafe goes green to indicate a complete charge, everything is fine.  Same also applies to me unplugging the MagSafe and switching to battery. What was spiking the CPU to 300% is now sitting back at 15%.
    I have tried multiple different power supplies, and also an SMC reset, though I don't think that is actually working. I remember in the past after doing an SMC reset, the laptop would cycle through a restart or do something to indicate the job is done, where as now it just straight up boots like nothing happened.
    Any ideas what may be causing this?
    OS X 10.9.4 / MacBookPro8,2 (Early 2011)

    Try the SMC and PRAM resets again:
    http://support.apple.com/kb/HT3964
    http://support.apple.com/kb/ht1379
    Maybe you will be lucky.
    Run an Apple Hardware Test.  Perhaps that will give a clue.
    http://support.apple.com/kb/ht1509
    Ciao.

  • Slow performance while integrating data with ODI while open report

    In ODI i have a schedulled package that runs every 4 hours, this package loads data from an DB table to BAM.
    Normally each execution loads about 4000 records and takes about 7 seconds to be completed.
    However, in some executions the same 4000 records take about 30 minutes to be loaded into BAM; normally this happens when a user has a BAM report open in the browser.
    Regards
    Hugo Calado
    Edited by: user12198856 on 23/Ago/2011 3:45

    Hi Manisha,
    When previewing a report, Report Designer need connect to the report data sources, run dataset queries, cache the data on the local computer, process the report to combine data and layout, and render the report. The report processor also runs all the queries
    for datasets in the report using the current parameter defaults, and saves the results as a local data cache (.rdl.data) file.
    The first time that previewing a report that relies on a server reference. In your scenario, you can try to improve preview performance through the link below:
    http://technet.microsoft.com/en-us/library/ee240846.aspx
    Hope this helps.
    Regards,
    Heidi Duan
    Heidi Duan
    TechNet Community Support

  • Slow performance while loading the reports while previewing the report in sql server data tools

    Hi there,
    I am facing a weird issue where I am able to load and view deployed report in report manager in no time (in a second) but the same report is taking almost two minutes for preview
    Around 2500 records are to be displayed in it.
    My report shows two area charts.

    Hi Manisha,
    When previewing a report, Report Designer need connect to the report data sources, run dataset queries, cache the data on the local computer, process the report to combine data and layout, and render the report. The report processor also runs all the queries
    for datasets in the report using the current parameter defaults, and saves the results as a local data cache (.rdl.data) file.
    The first time that previewing a report that relies on a server reference. In your scenario, you can try to improve preview performance through the link below:
    http://technet.microsoft.com/en-us/library/ee240846.aspx
    Hope this helps.
    Regards,
    Heidi Duan
    Heidi Duan
    TechNet Community Support

  • Fonction HR_INFOTYPE_OPERATION very slow performance in bacth job

    Hi all experts!
    Does any one having a problem with slow performance while using the fonction HR_INFOTYPE_OPERATION and running in batch mode for a big population of data ?
    I have tried to use          
        nocommit         = 'X' as parameter in the fonction HR_INFOTYPE_OPERATION
    and calling after each update.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
          EXPORTING
            wait = 'X'.
    And the performance is very long.
    I also remarque that if we run for a small population like less than 500 employees then it finish within 20 mins. But If I ran for a polulation of 5000 employees then it take more than 6 hours = 3600 mins. ?
    Thanks for your answer.
    Hugo Nguyen

    Call Function module 'HR_PSBUFFER_INITIALIZE' After each call to HR_INFOTYPE_OPERATION.
    Refer [link|http://brookshireconsulting.com/technical_update.html] for more information.
    I have tried it my own and it do improve the performance,.
    Hope this improves the performace for you as well.
    Regards
    Shital

  • I have an iPod touch 4 an it gets overheated while charging an becomes slow

    I have an iPod touch 4 an it gets overheated while charging an becomes slow when I touch the screen. Can someone tell me why an what I should do?

    Apple will only give you a 10% recycling discount if you turn in an old iPod when you purchase a new one. Better off selling it yourself.
    Apple - Recycling Program for iPod and Mobile Phones         

  • Slow Performance - Java Related?

    This is an old box that I bought used recently, but the system install is recent. The system performs very slowly - about 50% of the speed of comparable Mac's in the XBench database. If I use Xupport to manully run "All" of the system maintenance crons I get some improvement, but it quickly goes back to being slow.
    Looking at my logs I have a "boat load" of Java errors under CrashReporter; there will be a string of "JavaNativeCrash_pidXXX.log" entries - many of them, as follows:
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : Bus Error occurred at PC=0x908611EC
    Function=[Unknown.]
    Library=/usr/lib/libobjc.A.dylib
    NOTE: We are unable to locate the function name symbol for the error
    just occurred. Please refer to release documentation for possible
    reason and solutions.
    Many of the line entries that follow, but not all of them, refer to SargentD2OL, which is a Java app, which I installed, but it did not work properly so I removed it. Yet I continue to get Java errors that refer to this now non-existant app.
    I have read that Java apps use a lot of resources, and that D2OL in particular uses a lot of resources. Can my slow performance problem be Java related? If so, any idea of how I can fix this problem?
    G4 AGP Graphics   Mac OS X (10.3.9)   500 MHz, 512M RAM

    Sorry to take so long to respond, but other issues in life have demanded my attention.
    None of the solutions given have had any affect. My Java folder has both a 1.3.1 and a 1.4.2 app - the Java Update 2 will not reinstall because it sees an up-to-date app in the folder. But reading the update file it says the older Java will be removed - but it is still there. Problem?
    On XBench the system scores a 9 to 10, while similar boxes on the XBench database score around 18 to 20. My cpu, memory, and video scores are very low. The HD through-put scores are the only ones that are normal. TechTool Pro 4 finds no problems. I have removed the memory sticks one at a time and retested after each cycle - no difference.
    I have two drives, each with a 10.3.9 install. One works fine, scores around a 17 on XBench, the other scores a 9 to 10. So it appears to be a software problem. The slower install is a drive from a iMac G3 that has been moved to the G4 - are there issues with this?
    My favored drive is the prior G3 one (newer and faster than the other drive that system tests faster in XBench) - it has my profile and all my info on it. It worked fine in the G3 - no problems.
    Thanks for the help,
    G4 AGP Graphics Mac OS X (10.3.9) 500 MHz, 512M RAM, ATI 8500

  • Slow performance LR 1.3.1 (Library Module)

    LR 1.2 is running OK on my iMac. A while ago I tried LR 1.3. The upgrade really slowed down performance. Mostly a lag in the sliders and navigation tools in both Library and Develop modules that made it unworkable to me. I changed back to LR 1.2.
    Since I want to import Canon G9 RAW files into LR, I upgraded to LR 1.3.1 recently. Performance of sliders and the navigation tool in the Develop module seems the same as in LR 1.2 (or maybe even a little better). Which means it is OK (workable). It still shows the blur when navigating a 100% zoomed image though. But the navigation tool in the Library module still has the same slow performance as it had in LR 1.3. Unworkable!!! I tried everything: optimizing, new catalog, rendering previews, etc.
    I need the Library module to work smoothly (as in LR 1.2) in order to compare images at 100% zoom. I am afraid I have to go back to LR 1.2 again and find another solution for my Canon G9 RAW files. Most inconvenient. I am very disappointed. Especially, since Adobe showed they CAN get it right with the Develop module in version LR 1.3.1...
    Oh yeah, my system specs:
    iMac 2.16 GHz Intel Core 2 Duo
    3GB 667 Mhz DDR2 SDRAM (2GB + 1GB)
    232,89 GB Harddrive, 113 GB available
    ATI Radeon X1600 128MB
    Mac OS 10.4.11
    Please Adobe, make the Library module run as smoothly as the Develop module in version 1.3.2...

    The preview folder is 2,11 GB big. The .lrcat is 47 MB big.
    I opened a new test catalog. I imported 326 images. After the import I rendered 1:1 previews. It took a long time. Real memory used was between 700-1000MB. Virtual memory used was between 1000-1400MB. When it was done rendering it still keep on using 700MB real memory and 1000MB virtual memory. I had to close LR and restart. Real memory after restart was 75MB real memory and 375 virtual memory.
    But it didn't matter. The lag in the navigation tool of the Library module was still there.
    I noticed that when clicking in the navigation window there was less delay as when I slide the white square in the window (in Library module). In the develop module this seems the other way around. Sliding showed less delay than clicking.
    What's going on here?
    I also have a MacBook. Performance seems much faster than on my iMac overall. After creating a new catalog and rendering 1:1 previews, the lag in the navigation window seems less than before. But it was still there...

  • Slow Performance Weeks after Encryption

    I encrypted my organization's laptops several weeks ago and did not return them to users until after I could tell by device performance that the bulk encrypting task had completed. I have two users that are experiencing extremely slow performance on their systems. When the users are typing anything like a Word document, upon each keystroke they see the Windows 7 "circle" icon at the mouse cursor. This seems to come and go several times over the week, and every few days we are getting a request to resolve the issue but after restarting the behavior may not act up anymore.
    I found a TID suggesting to change HKLM\SOFTWARE\Novell-FDE\Parameters\ThrottleEncryption to a lower level like Idle or BelowNormal. Is there anything else that I should also try? Thanks!

    Yes, but nothing from Novell yet - I will keep pushing them forward and let you know if I get some results.
    -j-
    >>> Jim Koerner<[email protected]> 8.3.2013 15:29 >>>
    Sounds like you have a SR going on this also. Have you heard anything on a
    fix? Mine has been stagnant for a while and I just bumped it to see if
    anything has been figured out or if more info is needed from my side. Hope
    to here something soon. This is a pretty severe problem especially when it
    happens multiple times to a machine.
    Jim Koerner
    Server - ZCM 11.2.2 MU1 and Internal Database on Win2008R2x64
    Client - ZCM 11.2.2 MU1 on Win7SP1x64 and WinXPx32
    "Jouko Oksanen" <Jouko.Oksanen_re@move_efore.fi> wrote in message
    news:513713E9.13C8.00F6.0@move_efore.fi...
    Hi,
    We have had (maybe) similar issues with our FDE setup that FDE policy
    assigned devices tend to loose the policy and start to do disk decryption
    and suddenly get once again the policy back and start to encrypt again. This
    could be found from "ZCM agent, Full disk encryption, about, Agents status,
    Settings, on section "Emergency Recovery Information" you could see events
    'Zone Changed' what according to Novell support meant that the policy was
    "re-initialized / changed" even our policy counter have not changed = policy
    got lost in some phase.
    We are now suspecting that there is some issues with the policy service that
    plays tricks on us.
    -j-
    >>> Jim Koerner<[email protected]> 20.2.2013 19:57
    >>> >>>
    In ZCC on the devices that you are having issues with look at the Emergency
    Recovery tab and see if you have multiple listings in here that corresponds
    to the slowness. If so your devices are decrypting and then re-encrypting.
    Your mention of being asked to reboot leads me to believe that is what is
    happening to you.
    I have had a few SRs going on this one for a while and it got bumped to
    backend but no info in a month or so.
    Jim Koerner
    Server - ZCM 11.2.2 MU1 and Internal Database on Win2008R2x64
    Client - ZCM 11.2.2 MU1 on Win7SP1x64 and WinXPx32
    "marklar23" wrote in message
    news:[email protected]...
    I encrypted my organization's laptops several weeks ago and did not
    return them to users until after I could tell by device performance that
    the bulk encrypting task had completed. I have two users that are
    experiencing extremely slow performance on their systems. When the
    users are typing anything like a Word document, upon each keystroke they
    see the Windows 7 "circle" icon at the mouse cursor. This seems to come
    and go several times over the week, and every few days we are getting a
    request to resolve the issue but after restarting the behavior may not
    act up anymore.
    I found a TID suggesting to change
    HKLM\SOFTWARE\Novell-FDE\Parameters\ThrottleEncryption to a lower level
    like Idle or BelowNormal. Is there anything else that I should also
    try? Thanks!
    marklar23
    marklar23's Profile: http://forums.novell.com/member.php?userid=5123
    View this thread: http://forums.novell.com/showthread.php?t=464262

  • Slow performance on characteristic dimension filter

    Hi folks, I'm hoping you can help me troubleshoot something.  We have a report in a cube that's been in production and stable for a while (a year or more).  We're getting some complaints about slow performance, and I'm noticing that it takes 15 to 20 minutes for the selection screen to refresh with possible values for one of the characteristics of the Material dimension.  The characteristic only has 3 possible values for my selection.  I would expect it to take more like 1 or 2 minutes.  What should I look at to find the cause?  We're running BEx with version 3.0B of Business Warehouse.

    Carolyn,
    In the properties for the characteristic - set it to read data from the dimension table - this can be done from the BeX tab for the infoobject or from WAD if you are using a web template or from the properties in the characteristic in BeX..
    Arun
    Message was edited by:
            Arun Varadarajan

  • Slow performance of PreparedStatement

    I am having difficulty with extremely slow performance or a relatively simply Microsoft SQL Server 2000 call from my Java applet. Most of the application runs fine, but there are certain parts that are repeatedly giving me a long delay before completing their execution. The code is as follows:
    // Create the try block for the execution of the SQL code
            try{
                // Create the command to be executed
                String command = new String( "select Description, Enabled " );
                command += "from tLineInfo where( Line = ? )";
                // Create the SQL text to be executed
                PreparedStatement get = _connection.prepareStatement( command );
                get.setInt( 1, lineNo );
                // Execute the SQL command
                ResultSet lineInfo = get.executeQuery();
                // Display the information accordingly
                if( lineInfo.next() ){
                    // Populate the user data fields
                    description.setText( lineInfo.getString( "Description" ) );
                          <! more display code here >
    }   // End of if statment
                else{
                    // Clear the user data fields
                    description.setText( " " );
                           <! more display code here >
                }   // End of else statements
                // Close the result set in preparation for the next query
                lineInfo.close();
            }   // End of try block
            catch( Exception e ){
                // Display a dialog box informing the user of the problem
                Object[] options = { "     OK     " };
                JOptionPane.showOptionDialog( null, e.getMessage(),
                        "Error",
                        JOptionPane.OK_OPTION, JOptionPane.ERROR_MESSAGE,
                        null, options, options[ 0 ] ); 
            }   // End of Exception catch
            // Get the related area information
            populateAreaCombo( lineNo );       
    private void populateAreaCombo( int lineNo ){
            // Format the areaComboBox
             try{
                // Create a command to get the devices from the database
                String command = new String( "select Area, [Name], [Description] " );
                command += "from tAreas where( Line = ? )";
                // Create the SQL statement to grab the information, and
                // populate the search parameter
                PreparedStatement getAreas =
                        _connection.prepareStatement( command );
                getAreas.setInt( 1, lineNo );
                // Execute the command
                ResultSet areas = getAreas.executeQuery();
                // Loop through the result set, and add collect the areas
                Vector< String > controlAreas = new Vector();
                while( areas.next() ){
                    // Add the area to the comboBox
                    controlAreas.add( Integer.toString( areas.getInt( "Area" ) ) +
                            " - " + areas.getString( "Name" ) + ": " +
                            areas.getString( "Description" ) );
                }   // End of while loop
                      <! more display code here >
                    The application always seem to pause at the second PrepraredStatement call:
    PreparedStatement getAreas =
                        _connection.prepareStatement( command );This seems to be a very simple operation, and it is not even the execution of the query where the long delay is realized. Rather, it is in the actual creation of the object prior to the execution.
    The delay is very repeatable at this exact statement each time.
    Additionally, of interest, is that the delay is only realized on computers remotely connected to the database. If I run this code on the localhost, then there is no delay. As soon as I distribute it, then the delay is incurred. That being said, there is not a network related issue that I can identify here. I have even isolated the server to be on the network with just one other PC, and the delay still persisted.
    Does anyone have any ideas?
    Thanks

    I can determine where the delay occurs by adding
    dialog boxes at a bunch of different steps, then
    monitoring them for when they appear; a little
    archaic, of course, but an easy way to find this
    out.You should
    1. Get the start time
    2. Get the current time at each step.
    3. Print the results at the end.
    4. Repeat a number of times to average.
    >
    When you say that I should not mix database code with
    display code... What exactly do you mean? To be
    more precise in my description, I was simply setting
    a bunch of different text fields and/or check boxes,
    etc., based on the result set returned. It was not
    as if I was creating a portion of the GUI there or
    something. I am assuming that is an allowable
    practice...
    You should have a class that does nothing but the database work. That class should be used by other classes (like classes that do GUI.)
    I have made little effort to close my resources, and
    sometimes they are not closed at all. When you say
    "resources", what exactly do you mean by that? Are
    you referring to the result sets, for example? I do
    not know of other resources that need to be closed,
    except for the connection to the DB itself. This, I
    have as persistent throughout the duration of the
    user's session.
    You must close result sets, statements and connections. They must be closed in that order.
    I am not running this code on the Internet, but it
    has been designed to be run on a small corporate
    network ( < 10 users). This is why I opted for the
    applet to run the entire application through instead
    of doing more HTML work.That is ok.

  • Slow Performance or XDP File size very large

    There have been a few reports of people having slow performance in their forms (tyically for Dynamic forms) or file sizes of XDP files being very large.
    These are the symptoms of a problem with cut and paste in Designer where a Process Instruction (PI) used to control how Designer displays a specific palette is repeated many many times. If you look in your XDP source and see this line repeated more than once then you have the issue:
    The problem has been resolved by applying a style sheet to the XDP and removing the instruction (until now). A patch has been released that will fix the cut and paste issue as well as repair your templates when you open them in a designer with the patch applied.
    Here is a blog entry that describes the patch as well as where to get it.
    http://blogs.adobe.com/livecycle/2009/03/post.html

    My XDP file grow up to 145mb before i decided to see what was actually happening.
    It appears that the LvieCycle Designer ES program sometimes writes alot of redundant data... the same line millions of times over & over again.
    I wrote this small java program which reduced the size up to 111KB !!!!!!!!!!!!!!!!!! (wow what a bug that must have been!!!)
    Here's the sourcecode:
    import java.io.BufferedReader;
    import java.io.BufferedWriter;
    import java.io.FileNotFoundException;
    import java.io.FileReader;
    import java.io.FileWriter;
    import java.io.IOException;
    public class MakeSmaller {
    private static final String DELETE_STRING = "                           <?templateDesigner StyleID aped3?>";
    public static void main(String... args) {
      BufferedReader br = null;
      BufferedWriter bw = null;
      try {
       br = new BufferedReader(new FileReader(args[0]));
       bw = new BufferedWriter(new BufferedWriter(new FileWriter(args[0] + ".small")));
       String line = null;
       boolean firstOccurence = true;
       while((line = br.readLine()) != null) {
        if (line.equals(DELETE_STRING)) {
         if (firstOccurence) {
          bw.write(line + "\n");
          firstOccurence = false;
        } else {
         bw.write(line + "\n");
         firstOccurence = true;
      } catch (FileNotFoundException e) {
       e.printStackTrace();
      } catch (IOException e) {
       e.printStackTrace();
      } finally {
       if (br != null) {
        try {
         br.close();
        } catch (IOException e) {
         e.printStackTrace();
       if (bw != null) {
        try {
         bw.close();
        } catch (IOException e) {
         e.printStackTrace();
    File that gets generated is the same as the xdp file (same location) but gets the extension .small. Just in case something goes wrong the original file is NOT modified as you can see in the source code. And yes Designer REALLY wrote that line like a gazillion times in the .xdp file (shame on the programmers!!)
    You can also see that i also write the first occurrence to the small file just in case its needed...

  • ITunes 10.1 (64-bit) slow performance

    Hello all,
    I have recently bought a new pc, a very fast machine (see details below), but I'm experiencing bad performance with iTunes 10.1 (64-bit) for windows.
    I don't have a lot of stuff in iTunes, I have about 120 apps, 500 songs, 1200 photos, couple of ringtones and 0 videos in my library. The whole iTunes interface responds slowly. Like clicking on Music, Videos, my iPhone in the side menu makes iTunes freeze for a couple of seconds and then switches to the screen. Even after loading a screen iTunes is freezed for a seconds before it's responsive.
    I've googled around for a while, and got some tips to disable some options in the preference window, so I've set all unnecessary things off, like: crossfadings songs, automatic update checking, looking for devices, automatic organizing, ping, genius, shared libraries, etc. but it doesn't speed up iTunes much.
    It gets even worse whenever I connect my iPhone 3G (Fw 4.2.1, 16GB, Black). iTunes simply freezes for like half a minute and the pc makes a few beeping noises because of connecting an usb-device. Even Windows 7 slows down a lot while connecting. iTunes gets responsive once my iPhone appears under devices in the side menu.
    Software I have constantly running in the backround are: AVG anti-virus free edition, SQL Server 2008, Steam and Skype. Turning off these softwares doesn't make a difference as well. There are no virusses or whatever on my pc. I let AVG anti-virus do a complete scan like once a week.
    Taskmanager shows iTunes using about 240,000K of memory, followed by steam with 70,000k of memory and skype with 30,000k of memory.
    Anyone else experiencing slow performance or know how to resolve this ?
    System details:
    Windows 7 64-bit
    Intel i7 950 @ 3.06GHz quad core processor
    6gigs of ddr3 (1600mhz) memory
    Ocz vertex2 ssd (The O/S and all music, photos, apps are on this disk)
    nvidia graphics card gtx460
    Message was edited by: Leon49

    Same with me! I recently bought a new laptop, and iTunes 9 was working just fine. It takes like 5 seconds to scroll down one line. Clicking on different tabs and things takes forever as well. I am not sure what is causing it yet, but like you, I have disabled all sorts of iTunes settings which has not helped yet. Hopefully Apple will fix this problem soon! Let me know if you find a way to solve this.
    My PC Specs which are well above the minimum requirements:
    Asus UL80Jt
    Windows 7 64-Bit
    Intel i3 330UM Dual Core Processor @ 1.2GHz (ASUS Overclocking to 1.7 GHz)
    4GB RAM
    1.3 GB Dedicated Video RAM
    128 SSD

  • Oracle: slow performance with SELECT using ojdbc14 and connection pooling

    Hello,
    i'm working hard the last days to solve a performance problem with our customer using a oracle 10g database. For testing I used our oracle 9.2.0.1.0 database which shows the same symptoms. All doing solved nothing: the performance while using this oracle is much slower than other databases. This result I cannot trust and so I need some advice. What is missing to improve the performance on the java side?
    The webapplication I use runs fast on MySQL 4.x and SQLServer 2000, but on the above mentioned Oracle it was always 4 times slower. The webapplication uses a lot of simple SELECT-Statements without complicated joins and so on (because it should run on many different databases). Doing some days of creating tests within this webapplication, I was not able to find any entrance point for a change. All databases server I'm using, having only the default configurations after a common installation.
    To reduce the complexity I wrote a simple java application with connection pooling using only the latest libraries from apache-commons(dbcp, pool), and the latest ojdbc14 for oracle 9.2.
    First the results than the code: MySQL needed less than 1000 millisecond, SQLServer around 1000 milliseconds and Oracle over 2000 milliseconds. I stopped pooling and the results are for Oracle even worse: over 18000 milliseconds (mysql:2500, sqlserver:4100).
    I changed the classes for Oracle and used the class oracle.jdbc.pool.OracleConnectionCacheImpl from the ojdbc14-library. No difference (around 100 milliseconds more or less).
    The only Select-Statement works on this table, which has one index on HICTGID.
    It contains 259 entrances.:
    CREATE TABLE HIERARCHYCATEGORY (
      HICTGID                 NUMBER (19)   NOT NULL,
      HICTGLEVEL              NUMBER (10)   NOT NULL,
      HICTGEXTID              NUMBER (19)   NOT NULL,
      HICTGEXTPARENTID        NUMBER (19)   NOT NULL,
      HICTGNAME               VARCHAR2(255) NOT NULL
    );The application simply loops through this table using
    SELECT Hictgid, Hictgname FROM HIERARCHYCATEGORY WHERE HICTGID = ?, but I always open a connection before this query and closes this connection afterwards. So I use the pooling as much as possible. That's all SQL I'm using.
        protected static DataSource setupDataSource(String sDriver, String sUrl, String sUser, String sPwd) throws SQLException {
            BasicDataSource ds = new BasicDataSource();
            ds.setDriverClassName(sDriver);
            ds.setUsername(sUser);
            ds.setPassword(sPwd);
            ds.setUrl(sUrl);
            // The maximum number of active connections:
            ds.setMaxActive(3);
            // The maximum number of active connections that can remain idle in the pool,
            // without extra ones being released, or zero for no limit:
            ds.setMaxIdle(3);
            // The maximum number of milliseconds that the pool will wait (when there are no available connections)
            // for a connection to be returned before throwing an exception, or -1 to wait indefinitely:
            ds.setMaxWait(3000);    
            return ds;
        }I can switch by using external properties between three databases (oracle, mysql and sqlserver) and if I want I can switch pooling off. And all actions I'm interested are logged by Log4J.
        public static Connection getConnection() throws SQLException {
            Connection result = null;
            String sJdbcDriver = m_oJbProp.getString("jdbcDriver");
            String sJdbcUrl = m_oJbProp.getString("databaseConnection");
            String sJdbcUser = m_oJbProp.getString("dbUsername");
            String sJdbcPwd = m_oJbProp.getString("dbPassword");
                try {
                    if (m_oJbProp.getString("useConnectionPooling").equals("true")) {
                         if (log.isDebugEnabled()) {
                              log.debug("ConnectionPooling true");
                        if(null == m_ds) {
                            m_ds = setupDataSource(sJdbcDriver,sJdbcUrl,sJdbcUser,sJdbcPwd);
                              if (log.isDebugEnabled()) {
                                   log.debug("DataSource created");
                        result = m_ds.getConnection();
                    } else {
                        // No connection pooling:
                         if (log.isDebugEnabled()) {
                              log.debug("ConnectionPooling false");
                        try {
                            Class.forName(sJdbcDriver);
                            result = DriverManager.getConnection(sJdbcUrl, sJdbcUser, sJdbcPwd);
                        } catch (ClassNotFoundException cnf) {
                            log.error("Exception: Class Not Found. ", cnf);
                            System.exit(0);
    (.. ErrorHandling ...)Here is the code fragment which is doing the work:
                     StringBuffer sb = new StringBuffer();
                while (lNextBottom <= lNextCeiling) {
                     con = getConnection();
                     innerSelStmt = con.prepareStatement("SELECT Hictgid, Hictgname FROM HIERARCHYCATEGORY WHERE HICTGID = ?");
                     innerSelStmt.setLong(1, lNextBottom);
                     rsInner = innerSelStmt.executeQuery();
                     if ((rsInner != null) && (rsInner.next())) {
                         sb.append(rsInner.getLong(1) + ", " + rsInner.getString(2) + "\r");
                          if (log.isDebugEnabled()) {
                               log.debug("Inner Statement: " + rsInner.getLong(1) + "\r");
                     rsInner.close();
                     con.close();
                     lNextBottom++;
                 if (log.isInfoEnabled()) {
                      log.info("\rResult values: Hictgid, Hictgname \r");
                      log.info(sb.toString());
                 }and the main method:
        public static void main(String[] args) {
            try {
                 long lStartTime = System.currentTimeMillis();
                 JdbcBasic oJb = new JdbcBasic();
                 boolean bSuccess = false;
                 bSuccess = oJb.getHierarchycategories();
                 if (log.isInfoEnabled()) {
                      log.info("Running time: " + (System.currentTimeMillis() - lStartTime));
                 if (null != m_ds) {
                     printDataSourceStats(m_ds);
                      shutdownDataSource(m_ds);
                      if (log.isInfoEnabled()) {
                           log.info("Datasource closed.");
             } catch (SQLException sqe) {
                  log.error("SQLException within  main-method", sqe);
        }My database values are
    databaseConnection=jdbc:oracle:thin:@SERVERDB:1521:ora
    jdbcDriver=oracle.jdbc.driver.OracleDriver
    databaseConnection=jdbc:jtds:sqlserver://SERVERDB:1433/testdb
    jdbcDriver=net.sourceforge.jtds.jdbc.Driver
    databaseConnection=jdbc:mysql://localhost/testdb
    jdbcDriver=com.mysql.jdbc.Driver
    dbUsername=testusr
    dbPassword=testpwdThanks for your reading and maybe for your help.

    A few comments.
    There is of course another difference between your test cases then just the database. There is also the driver. And I suspect that in at least the case with the jtds driver it is helping you along where you are doing something silly and the Oracle driver is not.
    Before I explain the next part I would say the speed differences between MS-SQL and MySQL look about right I think you are aiming here for MS-SQL level performance not MySQL. (For a bunch of reasons MySQL is inherently faster but there are MANY drawbacks as well which have been well discussed on previous threads)
    Here is where I believe your problem lies
    while (lNextBottom <= lNextCeiling) {
                     con = getConnection();
                     innerSelStmt = con.prepareStatement("SELECT Hictgid, Hictgname FROM HIERARCHYCATEGORY WHERE HICTGID = ?");
                     innerSelStmt.setLong(1, lNextBottom);
                     rsInner = innerSelStmt.executeQuery();
                     if ((rsInner != null) && (rsInner.next())) {
                         sb.append(rsInner.getLong(1) + ", " + rsInner.getString(2) + "\r");
                          if (log.isDebugEnabled()) {
                               log.debug("Inner Statement: " + rsInner.getLong(1) + "\r");
                     rsInner.close();
                     con.close();
                     lNextBottom++;
                 }There at least four things that are wrong with above.
    1) Why are you preparing the statement INSIDE the loop. Let us for a moment say that the loop will spin 100 times. That means that you are preparing the same statement 100 times. This is bad. It is also very relevant because for example the Jtds driver is going to be caching the prepared statements you make so that actually while you try and prepare it 100 times it only actually does it once... but in Oracle I don't know what it is doing for sure but if it is preparing on each pass well than that bit of it is going take 100 times longer then it should.
    2) You are opening and closing the connection on each pass through the loop... also a terrible idea. You need to fix this first so that you can repeatedly use the same prepared statement.
    3) Why are you looping in the first place? More on this later.
    4) Where do you close the PreparedStatement? It doesn't look like you do.
    Okay so for starters your loop should look a lot more like this...
    code]
    con = getConnection();
    innerSelStmt = con.prepareStatement("SELECT Hictgid, Hictgname FROM HIERARCHYCATEGORY WHERE HICTGID = ?");
    while (lNextBottom <= lNextCeiling) {
    innerSelStmt.setLong(1, lNextBottom);
    rsInner = innerSelStmt.executeQuery();
    if ((rsInner != null) && (rsInner.next())) {
    sb.append(rsInner.getLong(1) + ", " + rsInner.getString(2) + "\r");
    rsInner.close();
    lNextBottom++;
    innerSelStmt.close();
    con.close();
    I think the code above (and you can put your debug stuff back if you want) which uses ONE connection and ONE prepared Statement will improve your performance dramatically.
    The other question though I would as is why in the hell you are doing 100 or whatever number of queries anyway. This can be done all in ONE query which again will improve performance.
    Your query and such should look like this I think.
    String sql = "SELECT Hictgid, Hictgname FROM HIERARCHYCATEGORY WHERE HICTGID >=? AND HICTGID<=?";
    PreparedStatement ps = conn.prepareStatement(sql);
    ps.setLong(1,lNextBottom );
    ps.setLong(2,lNextCeiling);
    ResultSet rs = ps.executeQuery();
    while(rs.next()){
      // your appending to string buffer code goes here
    }and I can't understand why you're not doing that in the first place.

  • Very, very slow performance

    Lightroom's performance on my computer has become, at times, intolerably slow.  After rebooting my iMac and not opening any other programs or browsers, it just took about eight minutes to import 23 files, and a few more minutes to build 1:1 previews.  When things are running fine this might take one minute.  (I always build 1:1 previews on import and this happens with recently imported files as well as older ones, so it's not a question of having to build previews on the fly.)  I've had extremely slow performance ("Loading") just moving from one photo to another in the Library and Develop modules or moving from one module to another, typically up to about 90 seconds, or when LR is "preparing the file" for export or edit in PS.  But not always -- sometimes it's quite zippy -- and there's no pattern that I can see.  Generally when this is occurring, memory "pressure" and CPU usage are normal, but it happens when usage is minimal as well.  Occasionally there is a spinning beach ball but not usually. 
    My catalog has about 30k photos and very few presets of any kind.  Probably 75% of these files have never been edited at all.  I don't make hundreds of local adjustment, rarely more than ten in one image.  I have about 40 Smart Collections with an average of several hundred images each.  I rarely use Smart Previews.  I optimize and back up the catalog every time I exit LR, which is a few times a week.  My file/folder structure is simple and clean:  /Pictures/year/day.
    I'm running LR 5.4 on a mid-2011 iMac, 3.4 GHz Intel Core i7, with 16GB of memory.  I have the Lightroom catalog and previews on the main drive, which is a 250GB SSD with about 100GB free.  (Problem happened when my catalog was on different internal drive, too.)  My pictures folder is on an internal drive with over 100GB available.  I have the maximum cache size set to 50GB.  I'm running Mavericks but it was just as slow under Mountain Lion.  It was just as slow in earlier versions of Lightroom, major and minor.  Other programs/apps run just fine on my computer, including Photoshop.  (Generally, LR's performance is the same whether or not PS is running.)  The only performance issue I've noticed since switching to Mavericks is that Finder stalls for several seconds every once in a while.
    I've seen this Lightroom problem referred to on various forums, including Adobe forums, for a long time now -- years -- and I've never seen a definitive fix.  I think I've answered all of the questions that are usually asked.  Is there any solution to this?  I use LR 30-40 hours per week.  I'm tearing my hair out and the option of moving to another program would be the very last resort, but I might have to do that. 

    I don't use your same workflow, and I assume you're shooting RAW. However,  after I have built 1:1 previews in LR (which takes a LONG time), when I click on a file to decide if it's sharp or not, it still takes 5-10 seconds for each file to load. And my computer isn't slow, and I have the same issue on my laptop, which is new and fast. I haven't seen a satisfactory answer to this problem, nor much acknowledgement from Adobe. My files are from a Nikon D7100 with 24 megapixels, so the file size is likely a factor.
    If you are shooting the type of subjects where you use 1:1 previews primarily to determine sharpness, you could consider Photo Mechanic (unfortunately it costs $150) as the first step in your workflow. It uses the embedded jpg files in the RAW file, so it loads 1:1 jpg previews almost instantly. Sports and nature photographers use this product all the time, mostly to delete losers.

Maybe you are looking for