throwing static exceptions sometimes VERY slow!
Vitaly Davidovich
vitalyd at gmail.com
Tue Feb 28 12:46:09 UTC 2017
On Tue, Feb 28, 2017 at 7:37 AM, David Holmes <david.holmes at oracle.com>
wrote:
> Hi,
>
> On 28/02/2017 9:02 PM, Wieland, Jacob wrote:
>
>> Hi,
>>
>> I am observing a very strange behavior.
>>
>> In our generated code (due to various reasons I won't go into here unless
>> I have to, but trust me, they are legit), we throw static exceptions for
>> control flow purposes, This seems to work fine and without performance loss
>> most of the time. However, we are observing now that every few seconds, a
>> throw sometimes takes up between 1,5 and 2.5 seconds! (in contrast to the
>> normal almost non-measurable time).
>>
>> Update: it seems that the observed behavior was kind of related with some
>> extraneous circumstances (the computer seems to have been more lagged than
>> usual at that point). By now, I can only observe throws that take up to 20
>> milliseconds (which opposed to the normal time still seems slow).
>>
>> It does not seem to be GC related, the only idea that I have is the
>> jitter.
>>
>
> What jitter?
I'm assuming Jacob is referring to the JIT. But yes, he needs to provide
more information.
In particular, it would be good to know the following, as David mentioned,
(off the top of my head):
1) JVM cmdline flags
2) Type of exception thrown (with a stacktrace or not)
3) Is the call stack depth about the same during the slow and fast throws?
4) Is the exception thrown frequently or infrequently?
5) Is there -XX:+PrintCompilation output available around the time when the
slowdown is observed
>
> So, my question is. Is this a known (and for some strange reason maybe
>> even accepted) behavior or is this a bug that I should file with Oracle (or
>> you guys).
>>
>
> You really are not giving us anything to go on here. How are you observing
> this slowness? Exactly how do you throw? What exactly are you measuring?
> What's the execution context, the machine, processors etc etc etc.
>
> Regards,
> David
>
>
>
>> BR
>>
>>
>> [X]
>>
>>
>>
>>
>> Dr. Jacob Wieland
>>
>> Senior Software Engineer
>>
>> main +49.30.7261919.34
>>
>> mobile +49.173.6446443
>>
>>
>> jacob.wieland at spirent.com<mailto:jacob.wieland at spirent.com>
>>
>>
>> www.spirent.com
>>
>>
>>
>>
>>
>>
>>
>>
>> Follow us on:
>>
>>
>>
>>
>> Spirent Communications
>>
>>
>> <https://www.linkedin.com/company/spirent-communications>[X]<
>> https://www.linkedin.com/company/spirent-communications>| <
>> https://twitter.com/Spirent>[X]<https://twitter.com/Spirent>| <
>> https://www.facebook.com/spirent>[X]<https://www.facebook.com/spirent>
>>
>>
>>
>>
>> Michaelkirchstraße 17/18
>>
>> 10179 Berlin, Germany
>>
>>
>>
>>
>>
>> +++++ N E W S F L A S H +++++
>>
>>
>>
>> Spirent Communications and Testing Technologies join forces to become
>> your test automation power-house. Read more at http://conta.cc/1S62BEY.
>>
>>
>>
>>
>> Spirent Communications e-mail confidentiality.
>> ------------------------------------------------------------------------
>> This e-mail contains confidential and / or privileged information
>> belonging to Spirent Communications plc, its affiliates and / or
>> subsidiaries. If you are not the intended recipient, you are hereby
>> notified that any disclosure, copying, distribution and / or the taking of
>> any action based upon reliance on the contents of this transmission is
>> strictly forbidden. If you have received this message in error please
>> notify the sender by return e-mail and delete it from your system.
>>
>> Spirent Communications plc
>> Northwood Park, Gatwick Road, Crawley, West Sussex, RH10 9XN, United
>> Kingdom.
>> Tel No. +44 (0) 1293 767676
>> Fax No. +44 (0) 1293 767677
>>
>> Registered in England Number 470893
>> Registered at Northwood Park, Gatwick Road, Crawley, West Sussex, RH10
>> 9XN, United Kingdom.
>>
>> Or if within the US,
>>
>> Spirent Communications,
>> 27349 Agoura Road, Calabasas, CA, 91301, USA.
>> Tel No. 1-818-676- 2300
>>
>>
More information about the hotspot-dev
mailing list