Slow performance with custom comparator (AdvancedDataGrid sorting)

I'm using Flex 3.4.
I have an advancedDataGrid. Have 2 columns with numbers as data.
For one column, I do not set any custom comparator function.
For the other column, I set a custom comparator function which is exactly the same as the default one used by Flex. (The private function SortField.numericCompare).
For both columns, I set the same data - 3000 Rows with values either 0 or 1.
When i sort on column1 (the one with custom comparator), the sorting is much slower than on column2 (default Flex comparator).
I went through the AdvancedDataGrid/SortField source codes but could not see why this could be happening as the comparator functions are the same in both cases.
Also, I checked out this bug -
http://bugs.adobe.com/jira/browse/SDK-13118
But shouldn't this be applicable to both custom and default sorting?
Can anyone help me out?

This is the function that i have : (same as the SortField numericCompare function which is the default function which is used if no customCompare is specified.)
        public function numCompare(a:Object, b:Object):int {
            var fa:Number;
            try {
                fa = _name == null ? Number(a) : Number(a[_name]);
            } catch (error:Error) {
            var fb:Number;
            try {
                fb = _name == null ? Number(b) : Number(b[_name]);
            } catch (error:Error) {
            return ObjectUtil.numericCompare(fa, fb);
As per bug, the performance should be slow for lots of items that have same value. But, it should be the same for both the custom compare and the default compare as the custom compare function I'm using is the same as what is used for Flex.

Similar Messages

  • Slow Performance with Business Rules

    Hello,
    Has anyone ever had slow performance with business rules? For example, I attached a calc script to a form and it ran for 20 seconds. I made an exact replica of the calc script in a business rules and it took 30 seconds to run. Also, when creating / modifying business rules in EAS it takes a long time to open or save or attach security - any ideas on things to improve this performance?
    Thanks!

    If you are having issues with performance of assigning access then I am sure there was patch available, it was either a HSS patch or planning patch.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Extremely slow performance with Radeon HD 7870

    Hi,
    I am using a number of Adobe programs on my new Windows 8 64 bit system, with 16 gigs of ram, an Intel Core i5 2.67ghz, and AMD Radeon HD 7870 2 gig. All the programs (including After Effects and Illustrator) work very well with the exception of Photoshop CS6 64 bit, which has extremely slow performance with Use Graphics Processor enabled in my preferences (which Photoshop selects by default). If I turn off Use Graphics Processor, the slow performance vanishes. If I change Drawing Mode to Basic, there might be a slightly detectable improvement over Normal and Advanced, but it's still horribly slow. The refresh rate seems to be just a few frames per second. Everything is slow: brushes, zooming, panning, everything.
    I've tried changing the settings I've seen suggested elsewhere: I switched Cache levels to 2, history states to 10, and tile size to 128k. No effect. Photoshop is currently at the default of using 60% of available ram. Efficiency has remained at 100% throughout all my tests. Also, this slow performance has affected me from the moment I installed Photoshop; it didn't crop up after previous good performance. The problem exists regardless of the size or number of documents I have open. Performance is still terrible even when I create a 500 x 500 pixel blank new canvas and try a simple task like drawing with the brush.
    Photoshop is fully up to date, and so are my graphics drivers (Catalyst version 13.1). Any help would be greatly appreciated; at the moment performance is so bad in Photoshop that it's unusable with graphics acceleration enabled. Thanks in advance for replying.
    Photoshop System Info:
    Adobe Photoshop Version: 13.1.2 (13.1.2 20130105.r.224 2013/01/05:23:00:00) x64
    Operating System: Windows 8 64-bit
    Version: 6.2
    System architecture: Intel CPU Family:6, Model:14, Stepping:5 with MMX, SSE Integer, SSE FP, SSE2, SSE3, SSE4.1, SSE4.2
    Physical processor count: 4
    Processor speed: 2665 MHz
    Built-in memory: 16379 MB
    Free memory: 13443 MB
    Memory available to Photoshop: 14697 MB
    Memory used by Photoshop: 60 %
    Image tile size: 128K
    Image cache levels: 2
    OpenGL Drawing: Enabled.
    OpenGL Drawing Mode: Advanced
    OpenGL Allow Normal Mode: True.
    OpenGL Allow Advanced Mode: True.
    OpenGL Allow Old GPUs: Not Detected.
    OpenCL Version: 1.2 AMD-APP (1084.4)
    OpenGL Version: 3.0
    Video Rect Texture Size: 16384
    OpenGL Memory: 2048 MB
    Video Card Vendor: ATI Technologies Inc.
    Video Card Renderer: AMD Radeon HD 7800 Series
    Display: 1
    Display Bounds: top=0, left=0, bottom=1080, right=1920
    Video Card Number: 2
    Video Card: AMD Radeon HD 7800 Series
    Driver Version:
    Driver Date:
    Video Card Driver: aticfx64.dll,aticfx64.dll,aticfx64.dll,aticfx32,aticfx32,aticfx32,atiumd64.dll,atidxx64.d ll,atidxx64.dll,atiumdag,atidxx32,atidxx32,atiumdva,atiumd6a.cap,atitmm64.dll
    Video Mode: 1920 x 1080 x 4294967296 colors
    Video Card Caption: AMD Radeon HD 7800 Series
    Video Card Memory: 2048 MB
    Video Card Number: 1
    Video Card: Microsoft Basic Render Driver
    Driver Version: 9.12.0.0
    Driver Date: 20121219000000.000000-000
    Video Card Driver:
    Video Mode:
    Video Card Caption: Microsoft Basic Render Driver
    Video Card Memory: 0 MB
    Serial number: 90970078453021833509
    Application folder: C:\Program Files\Adobe\Adobe Photoshop CS6 (64 Bit)\
    Temporary file path: C:\Users\RAFFAE~1\AppData\Local\Temp\
    Photoshop scratch has async I/O enabled
    Scratch volume(s):
      C:\, 931.5G, 534.8G free
    Required Plug-ins folder: C:\Program Files\Adobe\Adobe Photoshop CS6 (64 Bit)\Required\
    Primary Plug-ins folder: C:\Program Files\Adobe\Adobe Photoshop CS6 (64 Bit)\Plug-ins\
    Additional Plug-ins folder: not set
    Installed components:
       ACE.dll   ACE 2012/06/05-15:16:32   66.507768   66.507768
       adbeape.dll   Adobe APE 2012/01/25-10:04:55   66.1025012   66.1025012
       AdobeLinguistic.dll   Adobe Linguisitc Library   6.0.0  
       AdobeOwl.dll   Adobe Owl 2012/09/10-12:31:21   5.0.4   79.517869
       AdobePDFL.dll   PDFL 2011/12/12-16:12:37   66.419471   66.419471
       AdobePIP.dll   Adobe Product Improvement Program   7.0.0.1686  
       AdobeXMP.dll   Adobe XMP Core 2012/02/06-14:56:27   66.145661   66.145661
       AdobeXMPFiles.dll   Adobe XMP Files 2012/02/06-14:56:27   66.145661   66.145661
       AdobeXMPScript.dll   Adobe XMP Script 2012/02/06-14:56:27   66.145661   66.145661
       adobe_caps.dll   Adobe CAPS   6,0,29,0  
       AGM.dll   AGM 2012/06/05-15:16:32   66.507768   66.507768
       ahclient.dll    AdobeHelp Dynamic Link Library   1,7,0,56  
       aif_core.dll   AIF   3.0   62.490293
       aif_ocl.dll   AIF   3.0   62.490293
       aif_ogl.dll   AIF   3.0   62.490293
       amtlib.dll   AMTLib (64 Bit)   6.0.0.75 (BuildVersion: 6.0; BuildDate: Mon Jan 16 2012 18:00:00)   1.000000
       ARE.dll   ARE 2012/06/05-15:16:32   66.507768   66.507768
       AXE8SharedExpat.dll   AXE8SharedExpat 2011/12/16-15:10:49   66.26830   66.26830
       AXEDOMCore.dll   AXEDOMCore 2011/12/16-15:10:49   66.26830   66.26830
       Bib.dll   BIB 2012/06/05-15:16:32   66.507768   66.507768
       BIBUtils.dll   BIBUtils 2012/06/05-15:16:32   66.507768   66.507768
       boost_date_time.dll   DVA Product   6.0.0  
       boost_signals.dll   DVA Product   6.0.0  
       boost_system.dll   DVA Product   6.0.0  
       boost_threads.dll   DVA Product   6.0.0  
       cg.dll   NVIDIA Cg Runtime   3.0.00007  
       cgGL.dll   NVIDIA Cg Runtime   3.0.00007  
       CIT.dll   Adobe CIT   2.1.0.20577   2.1.0.20577
       CoolType.dll   CoolType 2012/06/05-15:16:32   66.507768   66.507768
       data_flow.dll   AIF   3.0   62.490293
       dvaaudiodevice.dll   DVA Product   6.0.0  
       dvacore.dll   DVA Product   6.0.0  
       dvamarshal.dll   DVA Product   6.0.0  
       dvamediatypes.dll   DVA Product   6.0.0  
       dvaplayer.dll   DVA Product   6.0.0  
       dvatransport.dll   DVA Product   6.0.0  
       dvaunittesting.dll   DVA Product   6.0.0  
       dynamiclink.dll   DVA Product   6.0.0  
       ExtendScript.dll   ExtendScript 2011/12/14-15:08:46   66.490082   66.490082
       FileInfo.dll   Adobe XMP FileInfo 2012/01/17-15:11:19   66.145433   66.145433
       filter_graph.dll   AIF   3.0   62.490293
       hydra_filters.dll   AIF   3.0   62.490293
       icucnv40.dll   International Components for Unicode 2011/11/15-16:30:22    Build gtlib_3.0.16615  
       icudt40.dll   International Components for Unicode 2011/11/15-16:30:22    Build gtlib_3.0.16615  
       image_compiler.dll   AIF   3.0   62.490293
       image_flow.dll   AIF   3.0   62.490293
       image_runtime.dll   AIF   3.0   62.490293
       JP2KLib.dll   JP2KLib 2011/12/12-16:12:37   66.236923   66.236923
       libifcoremd.dll   Intel(r) Visual Fortran Compiler   10.0 (Update A)  
       libmmd.dll   Intel(r) C Compiler, Intel(r) C++ Compiler, Intel(r) Fortran Compiler   12.0  
       LogSession.dll   LogSession   2.1.2.1681  
       mediacoreif.dll   DVA Product   6.0.0  
       MPS.dll   MPS 2012/02/03-10:33:13   66.495174   66.495174
       msvcm80.dll   Microsoft® Visual Studio® 2005   8.00.50727.6910  
       msvcm90.dll   Microsoft® Visual Studio® 2008   9.00.30729.1  
       msvcp100.dll   Microsoft® Visual Studio® 2010   10.00.40219.1  
       msvcp80.dll   Microsoft® Visual Studio® 2005   8.00.50727.6910  
       msvcp90.dll   Microsoft® Visual Studio® 2008   9.00.30729.1  
       msvcr100.dll   Microsoft® Visual Studio® 2010   10.00.40219.1  
       msvcr80.dll   Microsoft® Visual Studio® 2005   8.00.50727.6910  
       msvcr90.dll   Microsoft® Visual Studio® 2008   9.00.30729.1  
       pdfsettings.dll   Adobe PDFSettings   1.04  
       Photoshop.dll   Adobe Photoshop CS6   CS6  
       Plugin.dll   Adobe Photoshop CS6   CS6  
       PlugPlug.dll   Adobe(R) CSXS PlugPlug Standard Dll (64 bit)   3.0.0.383  
       PSArt.dll   Adobe Photoshop CS6   CS6  
       PSViews.dll   Adobe Photoshop CS6   CS6  
       SCCore.dll   ScCore 2011/12/14-15:08:46   66.490082   66.490082
       ScriptUIFlex.dll   ScriptUIFlex 2011/12/14-15:08:46   66.490082   66.490082
       svml_dispmd.dll   Intel(r) C Compiler, Intel(r) C++ Compiler, Intel(r) Fortran Compiler   12.0  
       tbb.dll   Intel(R) Threading Building Blocks for Windows   3, 0, 2010, 0406  
       tbbmalloc.dll   Intel(R) Threading Building Blocks for Windows   3, 0, 2010, 0406  
       updaternotifications.dll   Adobe Updater Notifications Library   6.0.0.24 (BuildVersion: 1.0; BuildDate: BUILDDATETIME)   6.0.0.24
       WRServices.dll   WRServices Friday January 27 2012 13:22:12   Build 0.17112   0.17112
    Required plug-ins:
       3D Studio 13.1.2 (13.1.2 20130105.r.224 2013/01/05:23:00:00)
       Accented Edges 13.0
       Adaptive Wide Angle 13.0
       Angled Strokes 13.0
       Average 13.1.2 (13.1.2 20130105.r.224 2013/01/05:23:00:00)
       Bas Relief 13.0
       BMP 13.0
       Camera Raw 7.3
       Chalk & Charcoal 13.0
       Charcoal 13.0
       Chrome 13.0
       Cineon 13.1.2 (13.1.2 20130105.r.224 2013/01/05:23:00:00)
       Clouds 13.1.2 (13.1.2 20130105.r.224 2013/01/05:23:00:00)
       Collada 13.1.2 (13.1.2 20130105.r.224 2013/01/05:23:00:00)
       Color Halftone 13.0
       Colored Pencil 13.0
       CompuServe GIF 13.0
       Conté Crayon 13.0
       Craquelure 13.0
       Crop and Straighten Photos 13.1.2 (13.1.2 20130105.r.224 2013/01/05:23:00:00)
       Crop and Straighten Photos Filter 13.0
       Crosshatch 13.0
       Crystallize 13.0
       Cutout 13.0
       Dark Strokes 13.0
       De-Interlace 13.0
       Dicom 13.0
       Difference Clouds 13.1.2 (13.1.2 20130105.r.224 2013/01/05:23:00:00)
       Diffuse Glow 13.0
       Displace 13.0
       Dry Brush 13.0
       Eazel Acquire 13.1.2 (13.1.2 20130105.r.224 2013/01/05:23:00:00)
       Embed Watermark 4.0
       Entropy 13.1.2 (13.1.2 20130105.r.224 2013/01/05:23:00:00)
       Extrude 13.0
       FastCore Routines 13.1.2 (13.1.2 20130105.r.224 2013/01/05:23:00:00)
       Fibers 13.0
       Film Grain 13.0
       Filter Gallery 13.0
       Flash 3D 13.1.2 (13.1.2 20130105.r.224 2013/01/05:23:00:00)
       Fresco 13.0
       Glass 13.0
       Glowing Edges 13.0
       Google Earth 4 13.1.2 (13.1.2 20130105.r.224 2013/01/05:23:00:00)
       Grain 13.0
       Graphic Pen 13.0
       Halftone Pattern 13.0
       HDRMergeUI 13.0
       IFF Format 13.0
       Ink Outlines 13.0
       JPEG 2000 13.0
       Kurtosis 13.1.2 (13.1.2 20130105.r.224 2013/01/05:23:00:00)
       Lens Blur 13.0
       Lens Correction 13.0
       Lens Flare 13.0
       Liquify 13.0
       Matlab Operation 13.1.2 (13.1.2 20130105.r.224 2013/01/05:23:00:00)
       Maximum 13.1.2 (13.1.2 20130105.r.224 2013/01/05:23:00:00)
       Mean 13.1.2 (13.1.2 20130105.r.224 2013/01/05:23:00:00)
       Measurement Core 13.1.2 (13.1.2 20130105.r.224 2013/01/05:23:00:00)
       Median 13.1.2 (13.1.2 20130105.r.224 2013/01/05:23:00:00)
       Mezzotint 13.0
       Minimum 13.1.2 (13.1.2 20130105.r.224 2013/01/05:23:00:00)
       MMXCore Routines 13.1.2 (13.1.2 20130105.r.224 2013/01/05:23:00:00)
       Mosaic Tiles 13.0
       Multiprocessor Support 13.1.2 (13.1.2 20130105.r.224 2013/01/05:23:00:00)
       Neon Glow 13.0
       Note Paper 13.0
       NTSC Colors 13.1.2 (13.1.2 20130105.r.224 2013/01/05:23:00:00)
       Ocean Ripple 13.0
       Oil Paint 13.0
       OpenEXR 13.0
       Paint Daubs 13.0
       Palette Knife 13.0
       Patchwork 13.0
       Paths to Illustrator 13.0
       PCX 13.1.2 (13.1.2 20130105.r.224 2013/01/05:23:00:00)
       Photocopy 13.0
       Photoshop 3D Engine 13.1.2 (13.1.2 20130105.r.224 2013/01/05:23:00:00)
       Picture Package Filter 13.1.2 (13.1.2 20130105.r.224 2013/01/05:23:00:00)
       Pinch 13.0
       Pixar 13.1.2 (13.1.2 20130105.r.224 2013/01/05:23:00:00)
       Plaster 13.0
       Plastic Wrap 13.0
       PNG 13.0
       Pointillize 13.0
       Polar Coordinates 13.0
       Portable Bit Map 13.1.2 (13.1.2 20130105.r.224 2013/01/05:23:00:00)
       Poster Edges 13.0
       Radial Blur 13.0
       Radiance 13.1.2 (13.1.2 20130105.r.224 2013/01/05:23:00:00)
       Range 13.1.2 (13.1.2 20130105.r.224 2013/01/05:23:00:00)
       Read Watermark 4.0
       Reticulation 13.0
       Ripple 13.0
       Rough Pastels 13.0
       Save for Web 13.0
       ScriptingSupport 13.1.2
       Shear 13.0
       Skewness 13.1.2 (13.1.2 20130105.r.224 2013/01/05:23:00:00)
       Smart Blur 13.0
       Smudge Stick 13.0
       Solarize 13.1.2 (13.1.2 20130105.r.224 2013/01/05:23:00:00)
       Spatter 13.0
       Spherize 13.0
       Sponge 13.0
       Sprayed Strokes 13.0
       Stained Glass 13.0
       Stamp 13.0
       Standard Deviation 13.1.2 (13.1.2 20130105.r.224 2013/01/05:23:00:00)
       STL 13.1.2 (13.1.2 20130105.r.224 2013/01/05:23:00:00)
       Sumi-e 13.0
       Summation 13.1.2 (13.1.2 20130105.r.224 2013/01/05:23:00:00)
       Targa 13.0
       Texturizer 13.0
       Tiles 13.0
       Torn Edges 13.0
       Twirl 13.0
       Underpainting 13.0
       Vanishing Point 13.0
       Variance 13.1.2 (13.1.2 20130105.r.224 2013/01/05:23:00:00)
       Variations 13.1.2 (13.1.2 20130105.r.224 2013/01/05:23:00:00)
       Water Paper 13.0
       Watercolor 13.0
       Wave 13.0
       Wavefront|OBJ 13.1.2 (13.1.2 20130105.r.224 2013/01/05:23:00:00)
       WIA Support 13.1.2 (13.1.2 20130105.r.224 2013/01/05:23:00:00)
       Wind 13.0
       Wireless Bitmap 13.1.2 (13.1.2 20130105.r.224 2013/01/05:23:00:00)
       ZigZag 13.0
    Optional and third party plug-ins:
       DAZ Studio 3D Bridge 12.0
       DazUpdateScene 12.0
    Plug-ins that failed to load: NONE
    Flash:
       Mini Bridge
       Kuler
    Installed TWAIN devices: NONE

    Great news!
    I followed your suggestion, Noel, and uninstalled my drivers with the Catalyst Uninstall Utility (which I hadn't used before), rebooted, reinstalled Catalyst 13.2 Beta 7, rebooted, deleted the PS Prefs, started PS, and now the performance is radically improved!
    It baffles me why I would need to do a clean driver uninstall in a new system environment that has only ever had this video card, and is only a few months old, but that action seems to be what's improved the situation. Note that because I deleted the PS preferences, the good performance now occurs with the default Use Graphics Processor enabled, and Drawing Mode set to Advanced (with every feature in the Advanced dialog checked except 30bit display).
    Having no reference point, I can't tell for sure if performance is as good as it theoretically ought to be for my system specs, but using the standard 13px brush is only slightly laggy behind the cursor, even if I become reckless and squiggle on the canvas violently. It wasn't just sluggish response before: Photoshop seemed to be in pain trying to draw the line segments as it laboured to catch up to the cursor. That is pretty much gone now.
    Much more tellingly, zooming and panning the canvas is like it ought to be, responsive and clean, more or less like it was for me in CS4 with my old Nvidia 9600GT. The poor performance with zooming and panning was the most worrying aspect of the issue. It's a great relief to see these working more properly now.
    I have to confess I'm a little embarrassed to have drug you through all this hassle only to discover that something as rudimentary as properly cleaning out the drivers would be the apparent solution. I never would have imagined that doing that, with such a new and stable system, would make any difference, since I don't have a legacy of older drivers dotting my hard drive. In any event, I'm really grateful that you guys took the time to try to help me.
    In the interest of completeness, here's the relevant portion of my system info after doing the reinstall steps I mentioned above:
    Adobe Photoshop Version: 13.1.2 (13.1.2 20130105.r.224 2013/01/05:23:00:00) x64
    Operating System: Windows 8 64-bit
    Version: 6.2
    System architecture: Intel CPU Family:6, Model:14, Stepping:5 with MMX, SSE Integer, SSE FP, SSE2, SSE3, SSE4.1, SSE4.2
    Physical processor count: 4
    Processor speed: 2665 MHz
    Built-in memory: 16379 MB
    Free memory: 13680 MB
    Memory available to Photoshop: 14695 MB
    Memory used by Photoshop: 60 %
    Image tile size: 1024K
    Image cache levels: 4
    OpenGL Drawing: Enabled.
    OpenGL Drawing Mode: Advanced
    OpenGL Allow Normal Mode: True.
    OpenGL Allow Advanced Mode: True.
    OpenGL Allow Old GPUs: Not Detected.
    OpenCL Version: 3.0
    OpenGL Version: 3.0
    Video Rect Texture Size: 16384
    OpenGL Memory: 2048 MB
    Video Card Vendor: ATI Technologies Inc.
    Video Card Renderer: AMD Radeon HD 7800 Series
    Display: 1
    Display Bounds: top=0, left=0, bottom=1080, right=1920
    Video Card Number: 2
    Video Card: AMD Radeon HD 7800 Series
    Driver Version:
    Driver Date:
    Video Card Driver: aticfx64.dll,aticfx64.dll,aticfx64.dll,aticfx32,aticfx32,aticfx32,atiumd64.dll,atidxx64.d ll,atidxx64.dll,atiumdag,atidxx32,atidxx32,atiumdva,atiumd6a.cap,atitmm64.dll
    Video Mode: 1920 x 1080 x 4294967296 colors
    Video Card Caption: AMD Radeon HD 7800 Series
    Video Card Memory: 2048 MB
    Video Card Number: 1
    Video Card: Microsoft Basic Render Driver
    Driver Version: 12.100.17.0
    Driver Date: 20130226000000.000000-000
    Video Card Driver:
    Video Mode:
    Video Card Caption: Microsoft Basic Render Driver
    Video Card Memory: 0 MB
    As you can see, the Microsoft Basic Render Driver still appears as a Video Card in the list. This presumably has something to do with Windows 8, and I really don't know if its presence here is still a sign that my card is not being used to its optimal capability. I have a hunch that the slight lag that I am still experiencing with the brush when Use Graphics Processor is on -- totally absent with the acceleration turned off -- implies that Photoshop is still unable to take maximum advantage of my card. I would assume that the brush tool should be more responsive with acceleration on than off, in a rig without any issues, but that's just assumption on my part. If you turn off Use Graphics Processor on your systems, is the brush tool more or less responsive?
    But again, panning the canvas with the hand tool is now extremely responsive, without any screen tearing or visible lag, and that's a massive improvement over the total meltdown of performance I was suffering from before.
    Thanks again very much for your help. I'm grateful to all of you who took the time to chime in.

  • Extremely slow performance with ojdbc6.jar on IBM JVMs (Java 6)

    We are consistently seeing slow performance (easily demonstrable by the simplest of test cases) while using ojdbc6.jar on IBM JDKs. Pefrormance is normal when we simply opt for ojdbc14.jar under the same JDK, same java program.
    Works well
    =======
    JRockit, ojdbc6.jar
    JRockit, ojdbc14.jar
    IBM JDK, ojdbc14.jar
    A lot slower
    =======
    IBM JDK, ojdbc6.jar
    All we had to do was to write a simple JDBC access program and measure time taken around
    Connection conn = DriverManager.getConnection(jdbcURL, dbProps);
    The first 3 combinations mentioned above return comparable numbers. The 4th combination takes 3-4 times as much.
    We initially saw this during performance test of our software on WebSphere (also supported on Weblogic). Later was able to eliminate WebSphere and Weblogic as the problem areas and narrow it down to the JVM. Reproduce-able on development machines.
    We have been using Oracle/WLS since BEA used to market 'Tengah' servers. This is the worst we have seen as far as the qaulity of support staff goes. We first level support seems clueless. We filed this case and the support comes back tells us that IBM JDKs are not supported for WLS! Oh, we have been running WLS/AIX/IBM JVM combination only for 5+ years.

    A quick solution to test this would be to do the following:
    mv /dev/random /dev/random.bk
    ln /dev/urandom /dev/random
    Note: The quick solution will disappear after a reboot. You could add it to rc.local to automatically make this change, but I wouldn't recommend it.
    The following is from [http://www.usn-it.de/index.php/2009/02/20/oracle-11g-jdbc-driver-hangs-blocked-by-devrandom-entropy-pool-empty/]:
    "Oracle 11g JDBC driver hangs blocked by /dev/random – entropy pool empty
    On a headless (=without console) network server, the 11g JDBC driver used for (java) application connect may cause trouble. In my case, it refused to connect to the DB without any error, trace or log entry. It simply hung. After several hours, it connected one time, and freezed again. Remote debugging done by the development clarified that it locks after calling SeedGenerator() and SecureRandom().
    Reason: The JDBC 11g needs about 40 bytes of secure random numbers, gathered from /dev/random, to encrypt its connect string.
    But public-available “man 4 random” says:
    When read, the /dev/random device will only return random bytes within the estimated number of bits of noise in the entropy pool. /dev/random should be suitable for uses that need very high quality randomness such as one-time pad or key generation. When the entropy pool is empty, reads from /dev/random will block until additional environmental noise is gathered.
    So far so good, now the question arises: Why does this mystic “entropy pool” runs out of gas?
    The answer is as simple as unsatisfying: because too less entropy “noise” was generated by the system. You can check the “filling level” (maybe zero?) of your pool and the overall size of the pool (usually 4096) by issuing
    cat /proc/sys/kernel/random/entropy_avail
    cat /proc/sys/kernel/random/poolsize
    Hint: /dev/random will deliver one new random number as soon as the pool has reached more than 64 entropy units.
    So why does my box not generate more entropy noise?
    Because only few drivers will fill the entropy pool, first of all keyboard and mouse. Sounds very useful on a server in a datacenter, isn’t it? Some block device and network drivers seem to do so as well, and I have read from guys on the net changing their network card and driver to enjoy this “feature”! But let’s stop ranting, /dev/random is simply made for high security randomness, and if it can’t make sure that randomness is as good as possible in this deterministic world, it stops. Intelligent people have created /dev/urandom for that, like “man 4 random” clearly states:
    A read from the /dev/urandom device will not block waiting for more entropy. As a result, if there is not sufficient entropy in the entropy pool, the returned values are theoretically vulnerable to a cryptographic attack on the algorithms used by the driver. Knowledge of how to do this is not available in the current non-classified literature, but it is theoretically possible that such an attack may exist. If this is a concern in your application, use /dev/random instead.
    Now let’s get back on our JDBC problem. Oracle JDBC 11g seems to use /dev/random by default, which causes usually no trouble on clients running with console access by a user, because his/her unpredictable :) actions will keep the entropy pool well-fed. But to make it usable on a headless server with a latently empty entropy pool, you should do several things, in descending security order (without warranty):
    1. Involve an audio entroy daemon like AED to gather noise from your datacenter with an open microphone, maybe combine it with a webcam noise collector like VED. Other sources are talking about “Cryptographic Randomness from Air Turbulence in Disk devices“. :)
    2. Use the Entropy Gathering Daemon to collect weaker entropy from randomness of userspace programs.
    3. Talk your JDBC into using /dev/urandom instead:
    -Djava.security.egd=file:///dev/urandom"

  • Newbie: 6020E (USB) slow performance with mixed digital and analog input

    Hi,
    I'm using a 6020E to do analog and digital input, and I'm getting very bad performance.
    Please note that doing IO in Labview is new to me!
    I have read the post about 6020E slow performance, and it says I should do buffered IO.
    Can anybody point me to some DOC or SAMPLE that actually shows or explains how one should do this. I need to read several digital IO lines (which I can combine in one port-read), and several analog inputs.
    Seeing how slow the reading on the 6020E is, I am amazed there is only one post that deals with this issue.
    I would be satisfied to get the 6020E into some sort of continuous read mode so that whenever I need data, I get the latest reading right away.
    thanks,
    Peter D'Hoye

    Hi Peter,
    Your cannot do buffered digital I/O with your daqpad. It doesn't have that capability. You can only make direct software calls with digital read/write from/to your port. So your digital IO is completely software clocked and not hardware clocked. The example you are trying is only for specific Simultanuous sampling boards or now also for M-series boards that are able to do correlated DIO.
    Use the Cont Acq&Graph Voltage-Int Clk.vi example for your analog measurements. (NI Example Finder) For your digital IO you can only use the examples like Read Dig Chan.vi, Read Dig Port,...
    There are indeed some slow performance issues with single point I/O Operations, that is correct.
    Check the explaination below:
    DAQPads are offered for the Universal Serial Bus (USB) and the IEEE 1394 (also known as FireWire). Both of these standards use a high-speed serial communication protocol between the computer and the device with a bandwidth up to 12 MB/s for USB and 400 MB/s for FireWire.
    During a single point operation, the DAQ device requires a complete set of configuration commands. This is done through serial communication (USB or FireWire), making the process slower than in a PCI-based board. The speed obtained for single point operation in a DAQPad is system dependent; this means that your computer processor, memory, bus speed, and other factors alter the speed at which you can do single-point operations with a DAQPad.
    For example, on the DAQPad-6020E, timed non-buffered analog input operations are limited to about 50 Hz. At higher rates, the software may become unresponsive. On a FireWire device, you can expect stable operation around 3,000 Hz. But again, these figures are system dependent.
    Regards.
    JV
    NI

  • Getting slow performance with -webkit-box-shadow [2.5.1]

    Hello, I just updated to the lastest Air version and I'm getting slow performance on my app when using this new css3 property just added, anyone else has the same problem?

    Thanks for your reply. I have actually found a way to fix the problem and it had nothing to do with the subvi's in my application (well almost nothing . The first thing I tried doing was taking out the display local variables which displayed lockin data on 3 screens of my application into 1 separate while loop and replacing the Lockin driver code with global variables which had only the data I wanted to display. This helped a little bit but here's what fixed my problem completely.
    When I created 2 lockin SubVIs I forgot to go into File->VI Properties->Execution and there select Time critical priority and in the other option drop down list: data acquisition.
    As soon as I did that in the 2 subvi's the lockins actually began performing in real time and now it takes milliseconds to detect the signal and to update the displays.
    I hope this helps. I'm surprised the NI Tech rep I spoke with, hasn't recommended this even though I asked if there are perhaps some sort of compiling or priority options in LabView.
    Well I'm happy since my problem is now fixed, I just need to get a little more RAM now.

  • Slow Performance with large library (PC)

    I've been reading many posts about slow performance but didn't see anything addressing this issue:
    I have some 40000 photos in my catalog and despite generating previews for a group of directories, LR still is very slow in scrolling through the pics in these directories.
    When I take 2000 of these pics and import them into a new catalog - again generating previews, the scroll through the pics happens much much faster.
    So is there some upper limit of recommended catalog size for acceptable performance?
    Do I need to split my pics up by year? Seems counter productive, but the only way to see the pics at an acceptable speed.

    I also have serious performance issues, and i don´t even have a large database catalog, only around 2.000 pictures, the db file itself is only 75 mb big. Done optimization - didn´t help. What i encountered is that the cpu usage of LR 1.1 goes up and STAYS up around 85% for 4-5 minutes after programm start - during that time, zooming in to an image can take 2-3 minutes! After 4-5 minutes, cpu usage drops to 0%, the background task (whatever LR does during that time!) has finished and i can work very smoothly. preview generation cannot be the problem, since it also happens when i´m working in a folder that already has all previews build, close LR, and start again instantly. LR loads and AGAIN i´ll have to wait 4-5 minutes untill cpu ussage has dropped so i can continue working with my images smoothly.
    This is very annoying! I will stop using LR and go back to bridge/acr/ps, this is MUCH much faster. BUMMER!

  • Extremely Slow performance with X58 Platinum

    I just upgraded from a core 2 quad 6600 with 8 gb of ram
    to a core i7 920 on an X58 Platinum with 12 gb of 1333 ram (yes the ram is an approved spec according to the MSI online manual....I checked the part numbers on the ram)
    I have an 9800gx2 and a velociraptor for a system drive, I have all the latest windows updates(vista 64) and the new 1.1 bios revision...and all the graphic card updates and chipset updates from intel
    It is running so slow that as I type this the letters on screen cannnot keep up with my fingers, and I am not that fast of a typer.
    It fells like I went back in time to a p3 or something.
    Where should I begin to diagnose the problem??
    Thanks in advance

    I too have stepped back in time with my x
    MSI x58 platinum board
    Specs
    Motherboard Name   MSI X58 Platinum SLI (MS-7522)Bios 322
    3 GIG  Ram                 Aeneon AXH760UD10-16HA08X
    CPU Type                   QuadCore Intel Core i7 920, 3800 MHz (21 x 181)
    CPU Cooler                  Noctua NH-U12P SE1366 LGA1366 i7 Heatpipe Cooler W/ 2XNH-P12 120MM Fan
    Hard Drives Raptors      SATA    Stripe (297 GB)Raid 0
    Video                         nVIDIA GeForce GTX 285 SLI   
    OS                            Microsoft Windows Vista Ultimate(64 Bit)
    I am running Raid 0 and performance is just terrible.Overclocks like a champ but the board is pretty much useless when it runs slow.
    Things I have tried installed BIOS 322 which brang boot time to desktop to 1 minute 45 secs slow but ok I guess,some improvement in a couple games.
    Installed XP64 no help or performance gain.
    Windows 7 would just not install any drivers at all.
    Vista 64 8 installs with no performance with different drivers.(You can install drivers off usb stick)
    Bought a new Motherboard but I am going to wait a few days more and see if others BIOS will help.
    There seems to be a few new BIOS I will try some them out today.
    Contacted MSI tech support and they were kind enough to suggest the bios,you can give that a shot and see if it helps you out.My board is Platinum SLI board but should be same as Platinum board also but they have all the platinum BIos there too.
    Regarding your concern,please log into following link to download and update to the latest bios A7522IMS.322:
    -ftp link, username, password removed--not for public release
    We would suggest you try to update the BIOS by using USB Bootable pendrive.It is convenienct for you:
    1.First of all,please make a bootable USB.You can download USBoot.rar from following link.Then please unzip this software and install it to make a booting USB device:
    --ftp link, username, password removed--not for public release
    2.Next go to our website to download BIOS file, then copy “AFUD4281.exe” and “A7522IMS.322” into USB.
    3.After that, restart PC, press F11, choose USB booting under “boot sequence”.
    4.Under DOS mode, please type “AFUD4281.exe A7522IMS.322”(without the quotation marks)and it will be updated successfully!!
    Remember to clean CMOS and Load Optimized Defaults under bios setup after you finish the BIOS update!

  • Linux AMD64, JDK 1.5_03: slow performance with large heap

    Tomcat app server running on jdk 1.4.2 on 32 bit Linux configured with mx1750m, ms1750m, runs fast. Returns 2MB of data through HttpServlet in under 30 secs.
    Moving the same app server to 64 bit on jdk 1.5.03 configured with mx13000m, ms10000m, the same request for data takes 5-20 minutes. Not sure why the timing is not consistent. If the app server is configured with mx1750m, ms1750m, performance is about 60 secs or less.
    I checked java settings through jstat. -d64 is the default. Why would increasing the heap cause such slow performance? Physical memory on the box = 32MB.
    It looks like it's definitely java related since a perl app making a http request to the server takes under a minute to run. We moved to 64bit to get around 1.7GB limitation of 32bit Linux but now performance is unacceptable.

    I Aggree, a AMD 64 with only 32 MB of memory would be a very strange beast indeed, heck, my graphics card has 4 times that, and it's not the most up-to-date.
    Keep in mind that switching to 64 does not only mean bigger memory space but also bigger pointers (on the sub-java level) and probably more padding in your memory, which leads to bigger memory consumption which in turn leads to more bus traffic which slows stuff down. This might be a cause for your slowdown, but that should not usually result in a slowdown as sever as the one you noticed.
    Maybe it's also a simple question of a not-yet-completely-optimized JDK for amd64.

  • LINQ grouping with custom comparer

    I'm trying to implement a linq grouping with a custom comparer. I have a datatable, I fill it with data, then I add the datarows to a
    List(Of DataRow), then I select all the rows to a IEnumerable(Of Object()). After that, I would like to group the result with a custom comprarer.
    This is the code:
    Dim result As IEnumerable(Of Object())
    Dim dt As New DataTable
    Dim indexes As New List(Of Integer)
    Dim groupedindexes As New List(Of Integer)
    Dim datarows As New List(Of DataRow)
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    dt.Columns.Add("f1", Type.GetType("System.Char"))
    dt.Columns.Add("f2", Type.GetType("System.Char"))
    dt.Columns.Add("f3", Type.GetType("System.Char"))
    For i = 0 To 100
    dt.Rows.Add("a", "b", "c")
    Next
    indexes.Add(0)
    indexes.Add(1)
    indexes.Add(2)
    groupedindexes.Add(0)
    groupedindexes.Add(1)
    groupedindexes.Add(2)
    For i = 0 To dt.Rows.Count - 1
    datarows.Add(dt.Rows(i))
    Next
    result = datarows.Select(Function(row) indexes.Select(Function(index) row(index)).ToArray)
    Dim test = result.GroupBy(Function(row) groupedindexes.Select(Function(grpindex) row(grpindex)).ToArray, New compare)
    End Sub
    And this is the compare class:
    Partial Class compare
    Implements System.Collections.Generic.IEqualityComparer(Of Object())
    Public Function Equals1(ByVal x() As Object, ByVal y() As Object) As Boolean Implements System.Collections.Generic.IEqualityComparer(Of Object()).Equals
    Dim equal As Boolean = True
    For i = 0 To x.Count - 1
    If x(i) IsNot y(i) Then
    equal = False
    Exit For
    End If
    Next
    Return equal
    End Function
    Public Function GetHashCode1(ByVal obj() As Object) As Integer Implements System.Collections.Generic.IEqualityComparer(Of Object()).GetHashCode
    Dim hashcode As Integer
    For i = 0 To obj.Count - 1
    hashcode = hashcode + obj(i).GetHashCode
    Next
    Return hashcode
    End Function
    End Class
    With the above code, I get all the 101 rows, but I would like to get only one row (a, b, c), since all the rows are the same. Therefore I wrote the custom comparer class. I'm new to this and I'm not sure, that I use it correct.
    Can you advise me, how should I modify the code to get only one row?
    Thanks.

    Try code below.  I use a dictionary to group rows and then filter results to get unique rows.
    Module Module1
    Sub Main()
    Dim dt As New DataTable
    Dim dict As Dictionary(Of Integer, List(Of DataRow)) = dt.AsEnumerable() _
    .GroupBy(Function(x) x.Field(Of Integer)("Col A"), Function(y) y) _
    .ToDictionary(Function(x) x.Key, Function(y) compare(y.ToList()))
    End Sub
    Function compare(rows As List(Of DataRow)) As List(Of DataRow)
    Dim results As New List(Of DataRow)
    results.Add(rows.FirstOrDefault)
    If (rows.Count > 1) Then
    For i = 1 To (rows.Count - 1)
    Dim unique As Boolean = True
    Dim rowArray() As Object = rows(i).ItemArray
    For j = 0 To (results.Count - 1)
    Dim oldArray() As Object = results(j).ItemArray
    For cols = 0 To (rowArray.Length - 1)
    If rowArray(i) <> oldArray(j) Then
    unique = False
    Exit For
    End If
    Next cols
    If unique = False Then
    Exit For
    End If
    Next j
    If unique = True Then
    results.Add(rows(i))
    End If
    Next i
    End If
    Return results
    End Function
    End Module
    jdweng

  • Super Slow Performance with Xserve RAID / Promise Fibre

    Hey guys,
    I am experiencing a strange thing on both 10.5.8 and 10.7.5 servers (yes these are in the process of being retired). They are sharing out either an Xserve RAID or Promise Vtrak with OS X Server.
    We have the fibre channel card and the storage attaches to there and they appear mounted on the desktop.
    The problem we are having is that whenever OS X's file sharing is enabled these volumes run incredibly slow! I did a clean install of OS X 10.7.5 on an entirely different machine and it was still bad. All of my tests show that when you turn off file sharing, both AFP and SMB, the performance goes back to normal -- so what can we do here??? These are file servers, so that's pretty much the only thing that needs to work.
    Thanks,
    Andrew

    Slow/poor RAID performance can be down to a number of things. Some of which are easier to check than others.
    Some easy things to check are:
    How much data is stored on the RAIDs?
    Performance really drops off alarmingly once the RAID gets to 85% full. For a 1TB RAID this means you need to keep at least 250GB of free disk space at all times otherwise you will get the poor performance you're seeing. Once it gets to 86/87/88% full performance can drop alarmingly. Yes those few percent points can make a big difference.
    How is the data stored on the RAIDs?
    Having thousands and thousands of single files stored loosely on the RAID or within one single folder is not a good idea. The Finder can be and is fairly inefficient at drawing the icons for those files that are presented to network users accessing the share point(s). This can/and is perceived as very slow performance as you're viewing the files over a network connection. One way to overcome this 'feature' is to organise the data into logical folders/sub-folders and/or shares.
    Are there problems with the file/directory structure of the RAIDs themselves?
    Use DiskUtility (or better still DiskWarrior) to repair any issues (generally built up over a period of time) with the storage disks you have. You can't repair permissions using DiskUtility or anything else on a non-OS bearing drive. Don't forget to do this also for your System Drive (which can have its permissions repaired) as well. This will mean the server being off-line for a time whilst the system (OS) drive is being repaired. Before doing this step I would make sure you have a current and effective backup of your System/Server OS as well as all data stored on the RAIDs themselves. Hopefully you should be doing this for your data already?
    To understand Disk Utility's repair permissions feature please read Apple's support document here:
    About Disk Utility's Repair Disk Permissions feature - Apple Support

  • Slow performance with 2 new full T1 installed .

    We've just added second Full T1 line to
    this router to dedicate full T1 bandwidth our two database servers.We are still experiencing the slow performance to our remote location such as file copying and acceessing applications.below are configs and sh run.Any help and inputs are greatly appreciated.Is the router configuration correct? or need to be modified.Thanks
    Danny.
    router2621xm#sh run
    Building configuration...
    Current configuration : 1924 bytes
    version 12.3
    service timestamps debug datetime msec
    service timestamps log datetime msec
    service password-encryption
    service udp-small-servers
    service tcp-small-servers
    hostname OPS
    boot-start-marker
    boot-end-marker
    enable secret xxxx
    enable password xxxx
    no network-clock-participate slot 1
    no network-clock-participate wic 0
    no aaa new-model
    ip subnet-zero
    ip cef
    no ftp-server write-enable
    class-map match-any VOIP
    match ip dscp ef
    policy-map VOIP-QOS
    class VOIP
    priority 1158
    class class-default
    fair-queue
    random-detect dscp-based
    interface FastEthernet0/0
    ip address 192.168.157.1 255.255.255.0 secondary
    ip address 192.168.7.1 255.255.255.0
    ip policy route-map policyroute speed auto
    full-duplex
    no mop enabled
    interface Serial0/0
    ip unnumbered FastEthernet0/0
    service-policy output VOIP-QOS
    no ip mroute-cache
    interface Serial0/1
    ip unnumbered FastEthernet0/0
    service-policy output VOIP-QOS
    no ip mroute-cache
    router eigrp 15
    network 192.168.1.0
    network 192.168.2.0
    network 192.168.3.0
    network 192.168.4.0
    network 192.168.5.0
    network 192.168.6.0
    network 192.168.7.0
    network 192.168.8.0
    network 192.168.151.0
    network 192.168.152.0
    network 192.168.153.0
    network 192.168.154.0
    network 192.168.155.0
    network 192.168.156.0
    network 192.168.157.0
    network 192.168.158.0
    network 192.168.201.0
    no auto-summary
    ip classless
    ip route 0.0.0.0 0.0.0.0 192.168.1.5
    no ip http server
    access-list 150 permit ip host 192.168.7.5 any
    access-list 150 permit ip host 192.168.7.6 any
    access-list 151 permit ip any any
    dialer-list 1 protocol ip permit
    route-map policyroute permit 10
    match ip address 150
    set interface Serial0/1
    route-map policyroute permit 20
    match ip address 151
    set interface Serial0/0
    line con 0
    line aux 0
    line vty 0 4
    password xxxx
    login
    end

    A couple of items worth noting are the QOS policies themselves.
    This is OK
    class-map match-any VOIP
    match ip dscp ef
    Add this
    class-map match-any VOIP-signalling
    match dscp af31
    match dscp cs3
    Change the policy-map to reflect the changes
    policy-map VOIP-QOS
    class VOIP-signalling
    bandwidth 16
    class VOIP
    priority 24
    class class-default
    fair-queue 256
    random-detect dscp-based
    The bandwidth is meant for 4 concurrent phone conversations so adjust up as needed. The priority is based on my own testing so take it as you may.
    The most important statement is "fair-queue 256", by default you only get 16 queues. Allowing for 256 queues only uses a modest amount of memory so its a simple low impact choice for the router and allows more conversations between devices without interruption.
    Upping the number of queues in your policy would be the best and most important item for your performance problem, next of couse to coercing EIGRP to load balance the T1s properly.
    Brian
    P.S. Create a loopback interface for the ip unnumbered use, cause if the Fa0/0 goes down everything goes down and you can't telnet in from anywhere to look at it. Eliminate the following items from the config by using "no" in fromt of them, a bit of research will tell you why, and start you toward eliminating a few other items.
    service udp-small-servers
    service tcp-small-servers

  • Slow performance with macbook pro retina

    Saving an image (JPEG) with my lightning fast new macbook pro 2012 retina edition takes 30-60 seconds.  Any ideas why?  Mountain lion Mac OS, 8GB RAM.  Can't upgrade RAM but shouldn't have to!  I moved images to external hard drive since I was filling up memory on laptop quickly.  I would appreciate ideas from anyone who knows Elements and Mac .  Thanks.

    This is my only computer now. Will check into auto analyzer (never heard of it). This is Elements 11, not the whole photoshop.  It is the regular, not app version.  I did move some of the photos from a past pc to it, but it seems to have the same slow speed with new photos as well.  I installed Elements 11 on my mac with a disc.  When I bought it, it came with both pc and mac discs.  A guy at the apple store had me move all the photos onto my external hard drive.  Its a new Apple 3 TB external hard drive.  I actually tried to increase the RAM at the suggestion of my camera club friends who had similar problem and got relief with increasing RAM of 4 up to 12 or 16.  Mine is 8 and can't be increased. 

  • Slow performance with javax.xml.ws.Endpoint.publish method

    I've published an endpoint on my computer with the javax.xml.ws.Endpoint.publish method. When I'm load testing my endpoint on the local machine, with the client side in another jvm, the endpoint reacts very fast (server side(endpoint) and the client side on the same computer). There's not performance problem there.
    But when I try to run a load test with the server side endpoint on my local computer and the client side on another computer the endpoint reacts slow, very slow compared to the local scenario. Instead of 500 requests / second I get like 3 requests / second. Why?
    When I look at the traffic between the client and the server running on different machines it's like 4,5 kB/sec on a 100Mbit connection. And almost no cpu activity (neither server or client).
    When I've a web server, like Tomcat or Sun Java Application Server and deploy my endpoint there the traffics goes up to 400kB/sec. So then it works fine with good performance over the same network, same ip address, same port and everything.
    Why is my endpoint so slow when I publish it with javax.xml.ws.Endpoint.publish instead of on a for example Tomcat. And why is the endpoint fast when I'm running client and server on the same machine?

    the timeout is a client side thing, most likely. you need to set the http request timeout on the client.

  • 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.

Maybe you are looking for

  • HELp! I have the red screen of Death

    Hello,  i have a  Mid 2009 model MacBook Pro that is making me sick, I Cant use it. can anyone tell me what to do for a red screen that comes on after tilting the screen up right? Thank you.

  • "Please connect your device" when my device is actually connected?

    Hi there, When I was trying to download some apps from the App World, it says that "Please connect your device.". However, my smart phone is actually connected. I'd taken off the battery and re-started my phone, and such circumstances still remains.

  • Keychain in Safari for Windows

    I do not have a Mac as of right now, but I have several iPhones and iPads.  I started to reuse Safari and the keychain option.  My question is does Safari for Windows support or have the Keychain feature? 

  • CRM -ISU bp replication

    HELLO ALL , WE ARE TRYING TO synchronize CRM - Isu master data  , business  / technical master data. In this  -CRM to ISU 1) BP sync  2)businees agrement sync 3) technical data 4)  contract sync now my first problem is when i am creating bp step 1 )

  • Scanner "switched off" crashes boot post performance update

    Reference: http://discussions.apple.com/thread.jspa?threadID=2199212 Yesterday I installed the update "Performance Update 1.0 (Snow Leopard)" and got the grey screen of death on reboot (see reference above). Long story made short, I managed a safe mo