Hacker News new | comments | show | ask | jobs | submit login

As mentioned in the article's comments, this appears to have been recently resolved.

Here is the full thread: https://bugzilla.mozilla.org/show_bug.cgi?id=686025




Aha. Now here may be the root cause:

Shawn Wilsher :sdwilsh 2011-09-18 12:33:22 PDT

The problem here is that Places (along with lots of other places in our code) still creates and uses synchronous database statements. SQLite is only threadsafe because it serializes all access to a database connection (this is unlikely to change any time soon).

To make this problem worse, every time we "fix" an area that does this, we end up putting more work on the background thread, which increases the likelihood that the remaining places that need to acquire the mutex on the main thread will encounter contention for the mutex.

Some of you might recall we hit this problem in the run-up to Firefox 4 as well (November/December of last year), and it caused Marco and I to have to reachitect a bunch of stuff in Places for a few months in order to work around it. Until Firefox removes all uses of the synchronous Storage API from the main thread, this issue will keep rearing it's head. (When that happens we can actually use SQLite in a way that stops using mutexs and will likely speed it up too.)


Hmm, from reading the thread it does not appear to have been solved, at least not the underlying problems. What was solved was the removal of a couple of synchronous calls. The fact that there are slow queries on some profiles seems to have been caused by the fact that ANALYZE does not run for some people[1], and this does seem like it has been fixed yet. I should check this for my Firefox profile at work to see if old stats are the reason for it hanging.

So what needs to be fixed ,if I follow that thread, is the removal of all synchronous calls and some solution to either not have to run ANALYZE or run it more often.

1. https://bugzilla.mozilla.org/show_bug.cgi?id=686025#c89


I'll believe it when I see it, pretty doubtful at this point.


Use the workaround that's in that thread. It works today.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: