Re: Disable debug logging
Posted by spectual on Oct 11, 2010; 6:00pm
URL: https://forum.jogamp.org/Disable-debug-logging-tp1672600p1682301.html
Well timeouts should be a quite rare event, so I dont think offhand it justifies the overhead of this implementation.
Maybe it could be possible to achieve the same level of tracking without allocating anything? Perhaps by saving a reference to thread owning the lock (or maybe just the thread id or name), if it can be done safely without retaining the thread indefinitely.
I tried to make a rough estimate of the overhead. My test application runs at 60 fps. Every 2 seconds is allocated:
240 instances of java.lang.Exception
1200 instances of java.lang.String
3600 new chars
This sums of to approx. 10 mb. of garbage over 65 seconds.
It is propably an insignificant overhead for most applications, but considering it might never get a timeout, also mainly just a waste of resources :)