开发者

rails wiki site - article edit highlighting/strikethrough with htmldiff maxes cpu

I'm implementing a wiki style site开发者_JAVA百科 and want to highlight changes made to articles between successive versions. Using htmldiff to highlight changes works great, except it is rather cpu intensive. I'm using the awesome vestal_versions plugin for versioning.

So how best to handle this? I considered having an on_create callback on version creation create a delayed job that processes and then stores the htmldiff processed article (in the version table row).

If this is a good approach, how can I extend vestal_versions without touching the gem? Or maybe there would be a better approach.

Any advice is much appreciated. :)


If you are already having scaling issues, I would push it to the browser if you can. How much work would it be to port htmldiff to Javascript? If you can push the CPU load to the browser it would be a win.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜