Why is the first lookup() relatively slow?

Hello hello,
I am doing load testing on an LDAP server right now. The first call to lookup() is an order of magnitude slower that subsequent lookup() calls over the same Context instance. Why?
I create a few instances of Context using Sun's InitialContext factory. I loop through a few lookup() requests over each of those Contexts. The first lookup takes 800 milliseconds, and all subsequent lookups take less than 20 milliseconds.
I believe that this has nothing to do with socket operations because I don't start the lookup thread until after its Context has been created. I've also checked the BER buffers sent and received by the LDAP provider, and verified that the security authentication is complete before I start timing the lookup.
Finally, I've also ensured that server-side caching does not cause subsequent requests to speed up.
This might have something to do with the operation of the particular LDAP server I'm using, OpenLDAP.
Has anybody else noticed similar behavior by a Context?

Im also having a similar problem. It takes about 1.2 seconds to create the InitialDirContext object.
DirContext ctx = new InitialDirContext(env); //takes about 1.2 sec
Im using eDirectory (Novell Directory Service). Im using 'simple' authentication and Im suppling the ID and password in the environment variables.
Did you find out anything?

Similar Messages

  • Why is the itunes download so slow

    why is the itunes download so slow - I am trying to download itunes update to recognize my new ipod touch 5th generation and my pc will not even show it in itunes, in trying to download the update the speeds are so slow that it is estimating download time in days.  I have stopped and started the apple in services, but it is still unrecognized.

    you know very well it has nothing to do with itunes or the modem/router.  apple servers are very very slow and its an absolute disgrace.
    you can download from third party servers at twice the speeds (at your own risk)
    Apple is the second largest company in the world and they treat customners in this way

  • Why is the first video frame black?

    Why is the first frame black?  How can I fix this?  When I edit a video, which includes removing the first second, and render it using medium quality H.264, the first frame is black in QuickTime, and the first second or two of video is black in HTML5 Video on the web.  When I load it in PS CS6 Extended, the first frames do not appear black.  When I render in low quality I don't get black frames but HTML5 Video looks terrible in Internet Explorer.   Thanks.

    Why is the first frame black?  How can I fix this?  When I edit a video, which includes removing the first second, and render it using medium quality H.264, the first frame is black in QuickTime, and the first second or two of video is black in HTML5 Video on the web.  When I load it in PS CS6 Extended, the first frames do not appear black.  When I render in low quality I don't get black frames but HTML5 Video looks terrible in Internet Explorer.   Thanks.

  • Why is the wi-fi so slow??

    Why is the wi-fi so slow on the time capsule??? Brand new bought last week? help? running about 13 devices on more than one network. Help please..

    Is it slow compared to other devices.. ??
    Give numbers.. cannot operate from general comments.
    Is this 2.4ghz.. are you splitting the load over 2.4ghz and 5ghz??
    Have you tried using SMB names.. short no spaces pure alphanumeric, with different name for 5ghz.
    Lock the wireless channel for 2.4ghz and test 1, 6, 11 in turn.
    Using WPA2 personal security only.. with 8-12 character passkey.. pure alphanumeric of course.

  • Why is the On Demand so slow to respond

    Title says it all
    Why is the On Demand so slow to respond?
    You have very fast Internet but extremely On Demand Programming Why is that?
    Fix it or ill have to go back to Road Runner. My wife runs a Preschool/Daycare and needs Fast On Demand programming because she's very busy with the kids.
    She allows them to watch some of the children's programming if they did well in the class work but she doesn't have time to wait for the EXTREMELY SLOW Response.

    Memory leakage causes it to run slow. One way to easily fix this is to reboot the box. It will automatically reallocate memory. To reboot, simply unplug power cord for 1 min then plug back in.
    Anthony_VZ
    **If someones post has helped you, please acknowledge their assistance by clicking the red thumbs up button to give them Kudos. If you are the original poster and any response gave you your answer, please mark the post that had the answer as the solution**
    Notice: Content posted by Verizon employees is meant to be informational and does not supersede or change the Verizon Forums User Guidelines or Terms or Service, or your Customer Agreement Terms and Conditions or plan

  • Why is the new firefox so slow hate it ?

    Why is the new Firefox so slow really hate i wish they would fix it ?

    Try Google Chrome. That one is really fast.

  • Why is the sound browser so slow during playback?

    Why is the sound browser so slow during playback? This problem seems to have no solution. This problem even occurs on my Mac Pro With 8 Cores... This problem is in its 3rd Generation since version 8... Even AU Plugins with built-in sound browsers trigger sounds in real time. Whats up Apple? I would love to find a solution after 5 yrs of using this program... U-Jean

    This Problem has been occurring before 2011 according to the link below....... *** Apple!!!
    http://www.logicprohelp.com/forum/viewtopic.php?t=70175

  • Why does the videos looks so slow

    why does the videos looks so slow only in the internet

    Many reasons, like what format they are, for instance Flash Videos will be slower.
    Any links to the slow ones?
    Which exact Mac do you have?

  • Why does the first iCal notification disappear as soon as I open the Apple cover so I can't read it?

    Why does the first iCal notification disappear as soon as I open the Apple cover? It disappears so quickly that I cannot read it!

    Right now (and for quite some time!) the community pages are a real PITA.  Trying to link the two did not bring the nice behavior of the Forums to the Community, but rather brought that stench over here!
    https://decibel.ni.com/content/thread/11597?tstart=0
    Flame on.  I find the community useless.
    Click on link, or revisit old address from browser.
    Hey nice, I am logged in. 
    Click on another link.
    Darn, now I am logged out.
    Log In.
    Now I am at the Community Home page, where the heck was I?
    Actually not mad, just indifferent.  I figure in a few months I'll hear that it was fixed and maybe I'll go back there.

  • Why has the download/buffering speed slowed down for videos?

    Why has the download/buffering speed slowed down for videos?
    What can be done about it?
    TIA,
    R. Ober

    The problem is with your router, your internet service provider or you have a marginal connection with your router.
    Locate your iPad close to your wifi router and see if the problem persists.
     Cheers, Tom

  • Why is Pages first launch so slow?

    When I launch Pages for the first time, it takes a long while before the program actually launches (it is almosty instantaneous on second launch). I was wondering why the inital launch is so slow and if anyone knew a fix to this. I was used to a rather snappier iWork in the prior edition.
    Thank you!

    My guess is that it's due to the new architecture of the iWork package.
    In old versions, quite all resources used by one component where stored in the component's package.
    This structure was HD space consuming but allow a "fast" load.
    With iWork '09 a new structure appear: the three applications are sharing a huge set of resources.
    As the files aren't stored in the same HD area, this may explain why the new version requires more time at first run.
    Of course, after that, most of the app is loaded so the app starts quickly.
    Yvan KOENIG (from FRANCE mardi 17 mars 2009 20:42:54)

  • Why is the write speed so slow to my NAS

    Hi, I am trying to improve the write speed from my MBP to the NAS.  I am using the Thunderbolt ethernet adapter connected to an Airport Extreme 7.6.1 using a wired connection. I have a Synology DS213 with a wired connection to the Airport Extreme as well. I am using CAT6 cables.
    In testing my performance, I noticed writing files from my MBP to the NAS was very slow; whereas my read performance was much better.  Please see the tests below to explain this further.
    Using the Blackmagicdesign Disk Speed Test Utility using a 5Gb test file written to the NAS, I see the following:
    Write speed is 7 to 8MB/s  This write speed is what concerns me.
    Read speed is between 60 MB/s and 75 MB/s
    Using 2 finder windows (drag a file from one window(MBP) to the other(NAS)) and watch the disk activity on the Activity Monitor with a 1Gb file
    When writing a file to the NAS from the MBP:
    Write speed will burst to 19 to 23 MB/s but it will drop to below 10 MB/s at times.
    When writing a file to the MBP from the NAS
    Write speed is: 46 to 60 MB/s
    Why would the write speed from my MBP to the NAS be so slow ; whereas, the write speed from the NAS to the MBP is very fast.
    Synology has 2 WB 'green' disks configured as raid 1.   I understand that part of the influence of writing from the NAS to the MBP is utilzing the advantage of writing to a SSD ; whereas, writing to the NAS it is writing to a slower drive.  
    Is 19 to 23 MB/s burst with dips below 10 MB/s during a copy typical?   The other thing is I dont understand why the Disk Speed Utility never records write speeds to the NAS over 10 MB/s whereas the Activity Monitor will show the bursts at times of 19 to 23 MB/s
    If 7 to 8 MB/s write speeds is too slow, what can I look at to improve this?  Since writing the file in the other direction is pretty fast considering, how could the issue be a network one?

    I was transferring my iPhoto library from an older MBP to a new retina and having the same issue - transfers almost immediately slowing to less than 100k/sec over my beautiful Time Warner-provided WiFi router using regular OSX folder sharing.  I couldn't find any software updates as some other similar threads suggested.
    I put my iPhoto library in a .tar.gz archive and that immediately transfered at about 7mb/sec, much much faster!  So, without having diagnosed the issue, perhaps I've uncovered evidence that one or both of my machines doesn't like transferring big file trees.  I bet a zip or any other archive would do the trick.

  • Why is the Space Constant so slow?

    Obviously I'm asking comparatively since they are faster then the blink of an eye.
    When trying to optimize some of my functions I've noticed that this one constant is really slow.
    Here's my test VI: I simply am measuring the time it takes to append a character to a string. If the string doesn't exist, don't add anything. This also prevents the compiler from optimizing out the for loop.
    Most cases I've averaged about 250 ms. However, if I used the space constant instead of putting a space character in a string constant. It nearly 10-fold the time it takes to nearly 2.1 seconds.
    So I question why is this the case? I don't see why all the other constants (I checked) run at full speed, but the space constant (which I can see it's block diagram) takes significantly longer. Is this a bug?
    Attachments:
    Space Timing.vi ‏14 KB

    bsvare wrote:
    As for being flawed. I wanted it to be. I don't want my for loop to be folded away. This simple test VI is so simple that it takes literally 10 million runs to have reasonible run time for compairison. If you fold it away to a single run, you can't see the effects.
    Well, it is flawed in the wrong way, because most likely the presence of a subVI will cause more complicated debugging code and the effect might be secondary. You could e.g. eliminate folding by e.g. doing a comparison of "[i] != 0" or "[i] AND 1" for the case decision. Now all variantions seem to be about the same speed (with or without debugging, resp., where debugging poses a large penalty).
    LabVIEW Champion . Do more with less code and in less time .

  • Why is the SMS app so slow to load?

    Is it just me or is the SMS app really slow to load?
    7 seconds seems a lot to me.
    How is it for u?
    How can I improve the loading time?
    Thank you

    I don't know why Apple doesn't fix this problem or even acknowledge it. I have had this problem since 1.1.2. Upgrading through 1.1.3, 1.1.4 and on the 2.1 has not helped. My SMS loading time varies between 3 and 10 seconds. I maintain all my SMS messages deleted (which I should not have to do). Due to lack of support from Apple I purchased a Nokia phone for my son. At least basic phone features work like they should.

  • Why is the IPad 4 so slow to charge and fast to discharge ??

    Why does the IPad 4 discharge so fast and be so slow to recharge

    Hello, willismom. 
    Thank you for visiting Apple Support Communities. 
    Battery life can be difficult to troubleshoot as multiple factors contribute to how long a charge can last.  Graphic intensive applications, display brightness and data connectivity are just a few of the items that can cause the battery life to decrease rapidly.  I would need to know a little more information about your usage patterns to give you and idea on how to maximize battery life.  However, here are some tips on how to adjust settings and charge the device that may help. 
    iPad: Charging the battery
    http://support.apple.com/kb/ht4060
    About Batteries
    About iPad Batteries
    If you feel that you need assistance with the battery concern, you can always reach out to us via the link below. 
    Contact Apple
    Cheers,
    Jason H. 

Maybe you are looking for

  • Can you help me with these exceptions??

    Hi guys, from sunday i try to eliminate these exceptions from my jsf application and i've lost any confidence in my possibility to realize it..... It's surely a simple problem but i'm a newbie of jsf and java. These are the exadel msg type Exception

  • In place variable substitution form1.page2.variable.rawValue

    Hello everyone, I am trying to do this using formcalc: var boostDate = "boosterDate1" form1.page2.invoiceTable.row1.boostDate.rawValue = Num2Date(Date2Num(form1.page2.page2Date.formattedValue, "MM/DD/YYYY") + (firstRowWeek * 7) + (firstRowYear * 365)

  • Help with wifi problems!

    so yeah...i've been having problems lately on my ipod touch's wifi cause it's connected on the internet at home ever since i bought it but after going home from an overnight at a friends house it didn't like automatically connected like it used to...

  • Audio clip will not adjust ???

    I can not make my audio clip move to the location I want....every time I move it the clip immediately returns to the beginning of my project. I want to start with some dialogue and then have music begin about 30sec. into the project but no luck. This

  • HELP FOR ABAP SELECT STATEMENT

    I am writing below query and getting below current result which is four rows. i would like to have result mentioned below in expected result which is single row.. any idea  how can i do that? It can be easily done in sql-plus using decode or union cl