Re: Threaded DOM operations
Re: Threaded DOM operations
- Subject: Re: Threaded DOM operations
- From: Jens Alfke <email@hidden>
- Date: Mon, 21 Jun 2010 12:00:46 -0700
On Jun 21, 2010, at 3:50 AM, Matej Bukovinski wrote:
> 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
That sounds weird to me. Those operations should be very fast. What is it you’re doing? Have you made sure you’re not using any techniques that scale poorly (such as bubble-sorts)? Are you sure it’s CPU-bound, or is it the time to load the web page that dominates? (If that’s the problem, you can definitely make WebKit load multiple pages in parallel.
> Does anyone have a suggestion how one would modify a HTML DOM on a background thread?
Not with WebKit.
> Perhaps some other framework that would allow me to construct a DOM tree from HTML source code and have basic tree operation support?
You could try using NSXMLDocument. If you use the tidy flag, it can parse real-world HTML. You might be able to use different instances on multiple threads.
—Jens_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden