Hello Konstantin,

With QWebSettings::global settings, the styleSheet API returns
immediately.However, setHtml() in QWebFrameAdapter sticks which is the
reason for delayed rendering first time.
Here we are not passing baseUrl but only htmldata as QString?

Any thoughts if ShouldOpenExternalURLsPolicy:: ShouldNotAllow cause this or
it is waiting on Webcore::ResourceResponse?

Appreciate your feedback in this regard.

Best Regards,
Ramakanth


On Sat, 5 Dec, 2020, 14:31 Ramakanth Kesireddy, <rama.k...@gmail.com> wrote:

> Yes delay is nothing but the execution time of setuserstylesheet with
> 7seconds.
>
> If I comment the entire stylesheet, it still takes 7 secs for any webpage.
>
> Is it recommended to use static QWebSettings::global settings() instead of
> dynamic instance with webview->page()->settings()?
>
> Best Regards,
> Ramakanth
>
> On Fri, 4 Dec, 2020, 23:36 Konstantin Tokarev, <annu...@yandex.ru> wrote:
>
>>
>>
>> 04.12.2020, 10:36, "Ramakanth Kesireddy" <rama.k...@gmail.com>:
>> > Hello Konstantin,
>> >
>> > Thanks for the details.
>> >
>> > Also the same UiApp setuserstylesheet codes work for Qt 4.8 based
>> QtWebKit 2.3.4 without any delay first time.
>> > Do you think of any potential changes in QtWebkit 5.212 Alpha4 that
>> could cause the first time load issue of user stylesheet?
>>
>> First, is "delay" you are talking about equal to execution time of
>> setUserStyleSheet? You can measure it simply by putting QElapsedTimer
>> before call and printing its value afterwards.
>>
>> My first guess about this "delay" is that it is caused by complex layout
>> computation. However it's hard to guess why 4.8 behavior is different
>> without profiling.
>> Did you try to do any profiling of what happens inside setUserStyleSheet?
>> Does execution time of setUserStyleSheet depend on page or stylesheet you
>> are trying to load?
>>
>> >
>> > Best Regards,
>> > Ramakanth
>> >
>> > On Thu, Dec 3, 2020 at 10:26 PM Konstantin Tokarev <annu...@yandex.ru>
>> wrote:
>> >> 03.12.2020, 19:40, "Ramakanth Kesireddy" <rama.k...@gmail.com>:
>> >>> Ok Thanks for your mail.Shall check and update further.
>> >>> Is it by design QWebSettings is not thread safe or any means to make
>> thread safe?
>> >>
>> >> WebCore by design is not thread safe. QWebView and all other classes
>> from QtWebKitWidgets module use WebCore directly and so aren't thread safe
>> too. You must call them from the same thread QWebView was created (and it
>> should better be main GUI thread, i.e. where QApplication is created).
>> >>
>> >> For comparison, QML API uses multi-process architecture so WebCore is
>> used in a background process and minimizes blocking of GUI process (i.e.
>> your application). Though that API is still not thread safe respective to
>> threads in GUI process (though it might be reentrant).
>> >>
>> >> --
>> >> Regards,
>> >> Konstantin
>>
>>
>> --
>> Regards,
>> Konstantin
>>
>
_______________________________________________
webkit-qt mailing list
webkit-qt@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-qt

Reply via email to