Results 1 to 6 of 6

Thread: Speed up QWebview javascript

  1. #1
    Join Date
    Jan 2010
    Posts
    8
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Speed up QWebview javascript

    Hello,

    Anyone knows how to speed up javascript in Qt? I'm using the QWebview and all javascript actions are very slow.

    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Speed up QWebview javascript

    Javascript in WebKit is (one of?) the fastest known JavaScript implementation so you will hardly find a way to speed it up. But the slowdown is probably not caused by java script but rather by other things going on in your application.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jan 2010
    Posts
    8
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: Speed up QWebview javascript

    Thanks for reply,

    Yes I know that it should be the faster implementation of Javascript. I don't think that it is a problem in the application("I hope so :-) ") because I'm juste using a QWebView to display a web site on a Window CE6.0 device (Cortex A8 600MHZ), and that what I can see is that the loading is very slow and when I press a button in the web site, the action takes a lot of time. I also compiled the application with the wm SDK6.0 and run it on to a Touch HD(528MHz). The application is a little quicker. I don't know why i have this behaviour. I was wondering that maybe I have had forget to add some configuration when compiling QT but I don't know.

    Any ideas??

    I'm running the same application on two devices. Must I recompile it with the windows CE6.0 sdk in order to use it on the Wince device; or just with the wm6.0professional is enough. There will be any difference or improvement??

    Thanks

  4. #4
    Join Date
    Feb 2010
    Posts
    12
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: Speed up QWebview javascript

    Me too,

    I found that qtwebkit Javascript is very slow(Qt4.6.2) on my windows ce device. anybody know why?

    Maybe building qtwebkit from gitorious trunk for windows ce, could improve performances, but anybody know how I could do that.
    I tried to replace the sources in qt4.6.2/src/3rdparty/webkit with gitorious sources but I can't build it; and also I tried the steps in webkit site: http://trac.webkit.org/wiki/BuildingQtOnWindows, also without success.

    Please help!!!!

  5. #5
    Join Date
    Mar 2012
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Speed up QWebview javascript

    Quote Originally Posted by wysota View Post
    Javascript in WebKit is (one of?) the fastest known JavaScript implementation so you will hardly find a way to speed it up. But the slowdown is probably not caused by java script but rather by other things going on in your application.
    I can confirm slow javascript performance on Linux Mepis 11 KDE 4, qt 4.7.1 with an intel graphics card on a DELL latitude d830 laptop.
    Very slow image transitions on fade out / fade in slideshow

    Both Firefox and google chrome perform very well.
    I am running Qwebview with pyqt inside a widget.


    python Code:
    1. class web(QWebView):
    2.  
    3. def __init__(self , w, h ,url,par=None):
    4. QWebView.__init__(self,par)
    5. self.settings().setAttribute( QWebSettings.PluginsEnabled , False )
    6.  
    7. self.resize(w, h)
    8.  
    9. self.load(QUrl(url))
    10.  
    11. self.show()
    12.  
    13.  
    14.  
    15. if __name__ == "__main__":
    16. app = QApplication(['rolling'])
    17.  
    18. x = web(int(sys.argv[1]),int(sys.argv[2]) , sys.argv[3])
    19. x.show()
    20. app.exec_()
    To copy to clipboard, switch view to plain text mode 
    Last edited by wysota; 23rd March 2012 at 11:04. Reason: removed URL

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Speed up QWebview javascript

    It works fine for me. Fade-in/fade-out works fluently on the url you provided.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Debugging JavaScript from QWebView
    By thiagoalencar22 in forum Qt Programming
    Replies: 0
    Last Post: 30th October 2009, 11:12
  2. Debugging JavaScript code evaluated by QWebView
    By thiagoalencar22 in forum Newbie
    Replies: 0
    Last Post: 28th October 2009, 12:24
  3. Javascript
    By ale301168 in forum Qt Programming
    Replies: 0
    Last Post: 6th September 2008, 23:23
  4. how Adding JavaScript to QWebView
    By Houda.Qt4 in forum Qt Programming
    Replies: 9
    Last Post: 12th July 2008, 22:44
  5. Adding JavaScript Obj to QWebView issues
    By bpetty in forum Newbie
    Replies: 2
    Last Post: 13th May 2008, 20:44

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.