[webkit-qt] Qtwebkit 5.212 setuserstylesheet() is taking 7seconds time first time on startup

Ramakanth Kesireddy rama.kesi at gmail.com
Wed Dec 2 02:14:32 PST 2020


Hi,

Do we need to initialize QWebcore to load the stylesheet fast for the first
time?

In UI app, user stylesheet is being set from child or worker pthread where
QApplication instance is created unlike sample app. Not sure if it makes
any difference in applying the stylesheet though.

Inorder to debug further in Qtwebkit sources and use QWebInspector with
UIApp, do we need to use Debug mode in cmake build type?


Thanks and Regards,
Ramakanth


On Tue, 1 Dec, 2020, 15:18 Ramakanth Kesireddy, <rama.kesi at gmail.com> wrote:

> Hi,
>
> Am using Qt WebKit 5.212 Alpha4 release through yocto build on top of Qt
> 5.6.3 binaries and found good with respect to security bugs and fixes as
> recommended and QtTestBrowser works fine on target.
>
> Below are the cmake qtwebkit bb options:
>
>  " \
>     -DCMAKE_BUILD_TYPE=Release -DCMAKE_SYSTEM_NAME=Linux
> -DCMAKE_SYSTEM_PROCESSOR=arm \
>     -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER
> -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY
> -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \
>     -DENABLE_WEBKIT2=OFF -DENABLE_OPENGL=OFF \
>     -DENABLE_GEOLOCATION=OFF -DENABLE_DEVICE_ORIENTATION=OFF
> -DENABLE_VIDEO=OFF -DENABLE_WEB_AUDIO=OFF -DUSE_LIBHYPHEN=OFF \
>     -DPORT=Qt \
>     -DCROSS_COMPILE=ON \
> "
>
> Below are the sample codes in our UiApp to set scrollbar stylesheet:-
> webView = new QWebView();
> webView->setContextMenuPolicy( Qt::NoContextMenu );
> webView->settings()->setUserStyleSheetUrl(
> QUrl::fromLocalFile(<stylesheetpath.css> ) );//This //API Takes 7 secs to
> apply stylesheet
> webView->settings()->setDefaultTextEncoding( "utf-8");
>
> Not sure why setUserStyleSheetUrl() takes more loading time of 7 secs on
> startup of UIApp when it is set through button click. Subsequent operations
> are fast but the issue occurs only first time when stylesheet is applied.
>
> Am unable to reproduce the same in sample app where it takes only
> 300-400ms for the same api  setUserStyleSheetUrl on target.
>
> Appreciate your suggestions in this regard incase there are any missing
> QWebSettings to be set or any synchronous or asynchronous loading.
>
> Best Regards,
>
> Ramakanth
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-qt/attachments/20201202/414cd676/attachment.htm>


More information about the webkit-qt mailing list