-
Notifications
You must be signed in to change notification settings - Fork 111
Backtraces kill the performance #129
Comments
Okay, I've got to admit, with |
What's your code ? |
https://github.com/golddranks/ganbare/blob/08251563f4dea94029e538cef4b8d93bc4fc3ce9/ganbare_backend/src/session.rs#L106 Just a simple |
Could you try to disable the |
Disabling the |
I did a some tests. First of all, I made a new test project. I was surprised by the... inconsistent behaviour I got. First of all, I got many times times that were comparable to my first report – something in the range of 150 - 250 ms. After running the tests for multiple times, but without any changes in my environment, I witnessed a sudden improvement in the times: now creating the error took 15 ms. After running the tests a bit more, I witnessed another change: the format of the backtrace changed from this:
to this:
It changes back to the top one every time I do some change and recompile, and after a while, it starts printing like the bottom one. This makes me think that there is something very dynamical going on. I wonder which libraries the backtrace crate hooks to? I'm running this on MacOS. |
Hum, strange... |
On Linux, the backtraces behave consistently, looking always the same, and taking 7~8 ms on debug and 5 ms on release. (This is virtualized so the times between MacOS and Linux may not be comparable) The backtrace crate uses something called |
Oh, so it's only a pb on macos ? Is so, try to find if the API used on mac is known to be slow. |
CoreSymbolication is slow when it renders backtraces. There is nothing you can do about that because it uses spotlight and some other things to find debug symbols. |
Well, that explains it. If the lazy-backtraces with deferred rendering helps, that would be great. Anyway, at least this behaviour is now explained. I'm going to close this. |
I'm not sure if this affected me before (I think not), or is it because of recent changes in upstream, but...
...seriously, this isn't an acceptable level of performance. My web app is all open to DoSsing if I it takes third of a second just to construct an
Error
. For reference, here's the figures with backtraces off:This is on MacOS. Are others experiencing these levels of performance drops?
The text was updated successfully, but these errors were encountered: