unbug
1 min readMar 23, 2016

Go crazy!I persisted the DOM in IndexDB.

Well, I got a performance issue with google-code-prettif , even WebWorker doesn’t help in my case. The source codes are too big.The browser gets frozen each time.It’s a pain to wait and the user don’t know why.So I take a snap of the rendered DOM and persisted in IndexDB.The next time the user come back,they don’t need to wait for google-code-prettif to render,I just innerHTML the DOM form IndexDB.It’s super fast ;)

Give it a try http://unbug.github.io/codelf/