In my experience, editing the DOM is very fast. If you are seeing slowness it's 
probably from doing huge numbers of these operations at once. So my advice 
would be to perform a handful of operations at a time, giving the main event 
loop time to run in between.

Mike.

On 21 Jun 2010, at 11:50, Matej Bukovinski wrote:

> Hello everyone,
> 
> I'm using WebKit to download a bunch of websites. On those sites I need to 
> perform some basic DOM tree operations (e.g., removing some DOM nodes). 
> WebKit makes this very straightforward by using elements such as DOMNodes to 
> represent the document three. The problem is that those operations can be 
> time intensive and I would need them to be performed in a background thread. 
> Unfortunately WebKit makes it very clear that it is not thread save (it even 
> throws exceptions if you don't perform operations on the main thread). 
> 
> Does anyone have a suggestion how one would modify a HTML DOM on a background 
> thread? Perhaps some other framework that would allow me to construct a DOM 
> tree from HTML source code and have basic tree operation support? I guess 
> WebKit2 is/will be thread safe, but it's pre-production code and I would like 
> to avoid using unstable code. 
> 
> Thank you,
> Matej_______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/cocoadev%40mikeabdullah.net
> 
> This email sent to cocoa...@mikeabdullah.net

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to