Page 1 of 2 12 LastLast
Results 1 to 20 of 31

Thread: Deploy the huge QtWebKit4.dll

  1. #1
    Join Date
    Jun 2010
    Posts
    86
    Thanks
    10
    Thanked 6 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Deploy the huge QtWebKit4.dll

    I use in my application these classes (and their dependencies of course)

    QWebView , QWebPage , QWebFrame

    and this forces me to deploy the hude QtWebKit4.dll (15 Mega Bytes)

    is there any way to just include only the classes that I need, not all the kit dll ?
    Last edited by ahmdsd_ostora; 22nd July 2010 at 09:44.

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

    Default Re: Deploy the huge QtWebKit4.dll

    Yes, you can strip down what you don't use. I'm not sure how much you can strip from WebKit though. Use the qconfig utility to disable some defines and then recompile Qt.
    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
    Jun 2010
    Posts
    86
    Thanks
    10
    Thanked 6 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Deploy the huge QtWebKit4.dll

    where is the qconfig utility ?
    i found a Qt project at (\qt\tools) with this name, is this what u mean?

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

    Default Re: Deploy the huge QtWebKit4.dll

    Quote Originally Posted by ahmdsd_ostora View Post
    i found a Qt project at (\qt\tools) with this name, is this what u mean?
    Yes. Build and run it.
    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.


  5. #5
    Join Date
    Jun 2010
    Posts
    86
    Thanks
    10
    Thanked 6 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Deploy the huge QtWebKit4.dll

    hey, I found the project and built it myself, ran the qconfig.exe , chose the qfeatues.txt, searched among the features, but I didn't find any webkit related features.
    I found networking, phonon, images, kernel, etc.

    any help?

  6. #6
    Join Date
    Jun 2010
    Posts
    86
    Thanks
    10
    Thanked 6 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Deploy the huge QtWebKit4.dll

    so, I will build Qt statically.

    But, can I use plugins while statically linking? (phonon or imageformats)

  7. #7
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Deploy the huge QtWebKit4.dll

    Why would you build statically? You'll still have the dependency on Webkit, which will now be statically linked and no smaller than its dynamic version; the only difference will be that every applicaiton you build it with will include its own copy of Webkit attached, and will load these copies into memory when run. Static builds won't reduce the final size, and will wind up duplicating code if multiple applications are involved.

    Webkit, unfortunately, is vast and monolithic; it builds as a single library, and that's pretty much the end of the story. There's nothing you can do about it, short of possibly stripping the resulting dll and making sure you're not building in debug mode, which includes many additional symbols.

    Note, too, that 15 MB of memory is rarely a concern with today's multi-gigabyte memory footprints. While examining resource usage with an eye toward reducing it is admirable, it may not be worthwhile in this case.

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

    Default Re: Deploy the huge QtWebKit4.dll

    As far as I remember WebKit simply can't be built in static mode. I might be wrong though, I never tried it myself or at least I don't remember doing so.
    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.


  9. #9
    Join Date
    Jun 2010
    Posts
    86
    Thanks
    10
    Thanked 6 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Deploy the huge QtWebKit4.dll

    Will static build add all the dll binary to my exe (if static build is avialable for WebKit) ?
    shouldn't it add only the used portions?

    really adding 15 mega to a 4 mega exe just for displating a web view is unacceptable

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

    Default Re: Deploy the huge QtWebKit4.dll

    Quote Originally Posted by ahmdsd_ostora View Post
    Will static build add all the dll binary to my exe (if static build is avialable for WebKit) ?
    shouldn't it add only the used portions?
    The thing is it is not the actually used code that counts but rather code used by classes used in the code. So if QWebPage has a QWebPage::setContentEditable() method and you are not using it, as far as I understand the code will still be included in your exe because you are using QWebPage (and WebKit is probably calling this method somewhere by itself).

    really adding 15 mega to a 4 mega exe just for displating a web view is unacceptable
    So don't use a QWebView, use QTextBrowser instead
    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.


  11. #11
    Join Date
    Jun 2010
    Posts
    86
    Thanks
    10
    Thanked 6 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Deploy the huge QtWebKit4.dll

    1- I understand that static build only adds any implementations that used by my used classes, not all classes in the WebKit !!, may be I am wrong.
    2- I cannot use TextViewer because I am showing Google Maps

    Thank you

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

    Default Re: Deploy the huge QtWebKit4.dll

    Quote Originally Posted by ahmdsd_ostora View Post
    1- I understand that static build only adds any implementations that used by my used classes, not all classes in the WebKit !!, may be I am wrong.
    But if you are using QWebView which is using QWebPage which is using QWebHistory then despite the fact that you are not referencing QWebHistory in your own code, it will still be embedded into your app.

    2- I cannot use TextViewer because I am showing Google Maps
    Functionality comes at a cost. See how large Firefox is.
    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.


  13. #13
    Join Date
    Jun 2010
    Posts
    86
    Thanks
    10
    Thanked 6 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Deploy the huge QtWebKit4.dll

    Quote Originally Posted by wysota View Post
    But if you are using QWebView which is using QWebPage which is using QWebHistory then despite the fact that you are not referencing QWebHistory in your own code, it will still be embedded into your app.
    I agree, but QWebView doesn't reference all the WebKit classess, so the argument is why all the classess are included ? I doubt

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

    Default Re: Deploy the huge QtWebKit4.dll

    Could you give examples of such classes which are unreferenced by QWebView or its dependencies?
    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.


  15. #15
    Join Date
    Jun 2010
    Posts
    86
    Thanks
    10
    Thanked 6 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Deploy the huge QtWebKit4.dll

    mmmm, I am surprised, the WebKit only has 15 classes. May be the QtWebKit module need some design enhancement to manage the deployed size.

  16. #16
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Deploy the huge QtWebKit4.dll

    Quote Originally Posted by ahmdsd_ostora View Post
    really adding 15 mega to a 4 mega exe just for displating a web view is unacceptable
    Why? What systems will this application be deployed on that will suffer from such resource usage?

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

    Default Re: Deploy the huge QtWebKit4.dll

    Quote Originally Posted by ahmdsd_ostora View Post
    May be the QtWebKit module need some design enhancement to manage the deployed size.
    You can always strip out some functionality but let's face it -- there is not much to be stripped if you want full HTML5, CSS and JavaScript support. The only benefit I see from having an application built statically is to use i.e. upx to compress the executable but then it will still be decompressed in memory when ran so it's just a matter of how large the deployment archive is.
    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.


  18. #18
    Join Date
    Jun 2010
    Posts
    86
    Thanks
    10
    Thanked 6 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Deploy the huge QtWebKit4.dll

    Quote Originally Posted by SixDegrees View Post
    Why? What systems will this application be deployed on that will suffer from such resource usage?
    Competition between vendors involves some memory usage, package size, and more considerations.

  19. #19
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Deploy the huge QtWebKit4.dll

    Quote Originally Posted by ahmdsd_ostora View Post
    Competition between vendors involves some memory usage, package size, and more considerations.
    I find it hard to believe that a 15-20 MB application will make any difference on current hardware; it represents only a few percent, at most, of available memory even on tiny devices.

    At the end of the day, there's nothing you can do. Webkit is not modular, so you're stuck with the whole bundle. I'm just having a hard time believing that a few megabytes is either significant or important.

  20. #20
    Join Date
    Jun 2010
    Posts
    86
    Thanks
    10
    Thanked 6 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Deploy the huge QtWebKit4.dll

    Quote Originally Posted by wysota View Post
    You can always strip out some functionality but let's face it -- there is not much to be stripped if you want full HTML5, CSS and JavaScript support. The only benefit I see from having an application built statically is to use i.e. upx to compress the executable but then it will still be decompressed in memory when ran so it's just a matter of how large the deployment archive is.
    I couldn't strip out anything from WebKit, qconfig doesn't mention it in its list.

Similar Threads

  1. HUGE BUG in Windows Installation!!!
    By joandelason in forum Installation and Deployment
    Replies: 9
    Last Post: 22nd March 2010, 09:07
  2. How to compile my QtWebKit4.dll in Qt4.5
    By cspp in forum Installation and Deployment
    Replies: 1
    Last Post: 16th June 2009, 09:06
  3. Huge Text File
    By mcosta in forum Qt Programming
    Replies: 3
    Last Post: 11th January 2008, 19:23
  4. Huge tableview low performance
    By semoser in forum Qt Programming
    Replies: 9
    Last Post: 9th November 2006, 17:58

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
  •  
Qt is a trademark of The Qt Company.