All UIWebViews share a single web thread.
When one of them is init
-ed, removed from superview etc., they will attempt to lock the web thread from the main thread in a blocking fashion, thus temporarily freezing the run loop of the main thread.
If the web thread is busy, e.g. while doing a long synchronous XMLHttpRequest
, this may block the main thread for a long time.
Is there a way to avoid this?
If I could modify UIWebView, I'd just make the lock attempt non-blocking, but obviously that's not the case, so I'm looking for other clever ideas.