Re: [webkit-dev] Parallel CSS styling

2011-06-07 Thread Kulanthaivel Palanichamy
Eric,

You're right that in flickr.com main page, Webkit spends very little time
in StyleForElement. However, if you visit 
http://www.flickr.com/photos/tags/sanfrancisco/ , WebKit spends most of
its CSS time in StyleForElement. For example, in our test machine (an
8-core Intel Xeon, 2.8GHz) StyleForElement takes 6450ms out of  9748 ms
spent on CSS (66%). Our algorithm focuses on that 66%, and makes it scale
linearly. The version of Webkit that we tested includes this patch: Bug
49876 - Optimize matching of descendant selectors

Other websites that would benefit:
•   amazon (68% in SFE)
•   Google search (57%)
•   Yahoo sports (56%)
•   Apple (58%)
•   Wikipedia article (65%)

-Kulanthaivel

 Do you have statistics on how much total time rendering flickr.com is
 in CSS/Style code at all?  I believe it to be very low.

 -eric

 On Mon, Jun 6, 2011 at 1:16 PM, Kulanthaivel Palanichamy
 kulanthai...@codeaurora.org wrote:
 Hi All,

 At Qualcomm Innovation Center we have been working on a parallel
 algorithm
 for CSS styling and wanted to see if there is any interest in the
 community to see it implemented in WebKit. The overall idea is that we
 replace CSS matching and styling with a parallel implementation assuming
 there is a barrier before and after the computation. CSS style
 application
 will be performed by the main thread, such that we avoid the need to
 make
 thread safe data structures accessed in other passes. The algorithm is
 task-based, so we would need to implement a thread pool and a simple
 task
 scheduler (or maybe use an existing one).

 In particular, our algorithm requires modifying Element::recalcStyle()
 and
 some of the methods it invokes. Code that calls Element::recalcStyle()
 will not have to be changed. By the time Element::recalStyle() returns,
 all threads involved on the parallel CSS styling have completed their
 execution.  Effectively, there is a barrier when Element::recalcStyle()
 begins and another before it returns.

 Our experiments show that our CSS computation for complex websites
 scales
 rather well. For example, we observed that, for  flickr.com, Webkit
 spends
 75% of its time in CSS doing CSS matching. Thus, our algorithm would
 give
 a maximum speedup of 1.6X on 2 cores and 2.3X on 4 cores.

 Please let us know whether this would be of interest to the community.


 -Kulanthaivel

 ___
 webkit-dev mailing list
 webkit-dev@lists.webkit.org
 http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev




___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


[webkit-dev] WebKit Layout test failures on Windows

2009-04-21 Thread Kulanthaivel
Hi,
Recently I downloaded WebKit revision 42567 and built it on windows. When I
tried to run run-webkit-tests script, many of the css tests are failed.

css1/basic/class_as_selector.html - failed.
css1/basic/comments.html - failed.
css1/basic/containment.html - failed.
css1/basic/contextual_selectors.html - failed.
css1/basic/grouping.html - failed.
css1/basic/id_as_selector.html - failed.
css1/basic/inheritance.html - failed
css1/box_properties .
css1/box_properties/acid_test.html - failed.
css1/box_properties/border.html - failed.
css1/box_properties/border_bottom.html - failed.
css1/box_properties/border_bottom_inline.html - failed.
css1/box_properties/border_bottom_width.html - failed.
css1/box_properties/border_bottom_width_inline.html - failed.
css1/box_properties/border_color.html - failed.
css1/box_properties/border_color_inline.html - failed.
css1/box_properties/border_inline.html - failed.
css1/box_properties/border_left.html - failed.
css1/box_properties/border_left_inline.html - failed.
css1/box_properties/border_left_width.html - failed.
css1/box_properties/border_left_width_inline.html - failed..
css1/box_properties/border_right.html - failedml - failed.
css1/box_properties/border_right_inline.html - failed failed.
css1/box_properties/border_right_width.html - failed- failed
.
.
.
I guess all these failures are related to incompatible fonts in Windows (The
fonts that are listed in DumpRenderTree.cpp are not available in Windows).
If these are font problems then please suggest me how to get these fonts to
pass the layout tests in Windows.

Thanks  Regards
Kvel
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] How to handle error response on the browser when the HTTP request fails

2009-02-16 Thread Kulanthaivel
Hi,
If you are using CURL then check the implementation
of WebCore\platform\network\curl\ResourceHandleManager.cpp. You can check
the callbacks headerCallback() writeCallback() which are used to pass the
header and data information from CURL to WebCore.
The ResourceHandleManager::downloadTimerCallback() will get called whenever
the download timer gets fired. Inside this function each CURL session is
processed and the result is passed back to WebCore whenever a particular
session is completed successfully or failed.
Regards
Kvel


On Mon, Feb 16, 2009 at 7:26 PM, Nitin Walke nitwa...@gmail.com wrote:

 Hi All,

 Thanks for your reply.I am totally new for the GtkWebkit.I tried to follow
 your suggestion but I am unable to achive my target.
 I get response in FrameLoaderClient::setMainDocumentError and
 FrameLoaderClient::shouldFallBack for the HTTP errorbut how to get actual
 error message from ResourceError that I don't know.Can I get exact steps to
 get the error like changes in the files and build the webkit,gtk  etc.

 Thanks  Regards,
 Nitin


 On Fri, Feb 13, 2009 at 10:50 AM, zaheer ahmad zaheer@gmail.comwrote:

 I think you need to set CURLOPT_FAILONERROR on the curl handle for the
 curl to report http errors. Also in general you would want to diffferentiate
 how you handle errors on mainresource vs subresources

 regards,
 Zaheer


 On Thu, Feb 12, 2009 at 9:04 PM, Nitin Walke nitwa...@gmail.com wrote:

 Hi,

 Thanks for your suggestion. I added delegate method in
 FrameloaderClient::dispatchDidFailLoading for GTK, however,
 noticed that the control flow never reached there - either in case of
 successful response or for http error like server not found etc.
 Then I added some debug code in FrameloaderClient::dispatchDidFailLoading
 for GTK; and found that the control flow does not reach there.

 Am I missing something here? Your inputs will be appreciated.

 Regards,
 Nitin


 On Thu, Feb 12, 2009 at 11:55 AM, zaheer ahmad zaheer@gmail.comwrote:

 If you are using curl backend, network errors are already reported back
 but ignored. you need to implement 
 FrameloaderClient::dispatchDidFailLoading
 delegate to pass it back to the application.

 regards,
 Zaheer


 On Wed, Feb 11, 2009 at 7:03 PM, Nitin Walke nitwa...@gmail.comwrote:

 Hi,

 I am new to Webkit and have developed a basic browser using Webkit GTK
 port on linux.
 I want to show error response on the browser when the HTTP request
 fails for some reason like
 bad gateway or Server error etc. Currently the browser does not show
 any response in case of any error.
 Please advise how to go about implementing the same.

 Thanks

 ___
 webkit-dev mailing list
 webkit-dev@lists.webkit.org
 http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev






 ___
 webkit-dev mailing list
 webkit-dev@lists.webkit.org
 http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Out-of-memory handling

2008-12-18 Thread Kulanthaivel
You can check the Nokia's S60WebKit MemoryManager implementation. They have
developed a method to handle out of memory situations in WebKit

On Tue, Dec 9, 2008 at 12:07 AM, Darin Adler da...@apple.com wrote:

 On Dec 8, 2008, at 8:21 AM, Kelemen Balázs wrote:

  A tempting approach would be using exception handling. E.g., what if we
 could catch a bad_alloc exception?


 To use exception handling you'd probably have to change all the WebKit code
 to do cleanup when an exception is propagating. Otherwise, exiting an
 arbitrary function half way through could leave data structures in an
 inconsistent state.

 Fixing this is a large project, almost certainly impractical.

  Would there be any way to simply force WebKit from the browser to
 shutdown itself? When I say shutdown, I mean exiting in an elegant way,
 e.g., we could save history and other important information to disk (so that
 when the browser restarts, some info does not get lost).


 Sure, you could do that if you make sure that the important information
 is stored in data structures that have some sort of integrity guarantee,
 which are not manipulated directly by the WebCore/WebKit code. And make sure
 the code that writes those data structures can function without allocating
 additional memory.

 But I don't think there's any real advantage to using exception handling
 for this. You could have a function called when out of memory that does this
 work.

 Another approach is to save history and other important information as you
 go. So if you run out of memory there's nothing that needs to be done.

-- Darin


 ___
 webkit-dev mailing list
 webkit-dev@lists.webkit.org
 http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Out-of-memory handling

2008-12-18 Thread Kulanthaivel
Yes I do. Nokia's Memory manager has a memory collector which goes and
collects memory if the available  application memory goes below certain
threshold. It collects memory from WebCore cache. If the collected memory is
not enough then it goes ahead and stops all the browser loads and notifies
the browser application about the out of memory situation. In WebKit they
have added OOM (Out Of Memory) conditions in various places (javascript
parsing/execution, html tokenizer, text encoding, image decoding etc..) and
if there is not enough memory then it gracefully fails.

Regards
Kulanthaivel

On Fri, Dec 19, 2008 at 12:58 PM, Paul Pedriana ppedri...@gmail.com wrote:

  You don't happen to know anything about the approach Nokia took, do you?

 Thanks

 Paul


 You can check the Nokia's S60WebKit MemoryManager implementation. They have
 developed a method to handle out of memory situations in WebKit

 On Tue, Dec 9, 2008 at 12:07 AM, Darin Adler da...@apple.com wrote:

 On Dec 8, 2008, at 8:21 AM, Kelemen Balázs wrote:

  A tempting approach would be using exception handling. E.g., what if we
 could catch a bad_alloc exception?


  To use exception handling you'd probably have to change all the WebKit
 code to do cleanup when an exception is propagating. Otherwise, exiting an
 arbitrary function half way through could leave data structures in an
 inconsistent state.

 Fixing this is a large project, almost certainly impractical.

  Would there be any way to simply force WebKit from the browser to
 shutdown itself? When I say shutdown, I mean exiting in an elegant way,
 e.g., we could save history and other important information to disk (so that
 when the browser restarts, some info does not get lost).


  Sure, you could do that if you make sure that the important information
 is stored in data structures that have some sort of integrity guarantee,
 which are not manipulated directly by the WebCore/WebKit code. And make sure
 the code that writes those data structures can function without allocating
 additional memory.

 But I don't think there's any real advantage to using exception handling
 for this. You could have a function called when out of memory that does this
 work.

 Another approach is to save history and other important information as you
 go. So if you run out of memory there's nothing that needs to be done.

-- Darin

 ___
 webkit-dev mailing list
 webkit-dev@lists.webkit.org
 http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


 --
 ___
 webkit-dev mailing 
 listwebkit-...@lists.webkit.orghttp://lists.webkit.org/mailman/listinfo.cgi/webkit-dev



___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev