[SOLVED] How to reduze the library size

Discuss here any questions about the WebLaF library.
Bugs can be posted directly to GitHub issues tracker.

[SOLVED] How to reduze the library size

Postby Shedra » Tue Sep 23, 2014 6:43 pm

Hi there,

is it possible to reduce the size of the librarys needed? I tried proguard but didn't work :(.

Because If I build a little "Hello World" Gui the jar is about 4,5MB in size. And my code only uses 5kB of the jar.

I include the libs via gradle

Code: Select all
dependencies {
    compile 'de.sciss:weblaf:1.28';
}


Do you have any solution for me?
Shedra
 
Posts: 1
Joined: Fri Aug 22, 2014 12:28 am

Re: How to reduze the library size

Postby mgarin » Tue Sep 23, 2014 9:18 pm

WebLaF has a few optional binaries.

In case we are talking about separate ones:
weblaf-core ~ 0.75 MB
weblaf-ui ~ 2.65 MB

And required dependencies:
SLF4J ~ 0.04 MB
XStream ~ 0.54 MB

There are also optional dependencies:
Java Image Scaling ~ 0.04 MB
Jericho HTML ~ 0.2 MB
RSyntaxTextArea ~ 1 MB

Without optional libraries - yes, it is about 4.5-5 MB weight.
And unfortunately WebLaF in its current state is non-obfuscable.

I doubt there are any good ways to dramatically reduce WebLaF size in case you need it as application L&F with all its features and stuff. Later on I will be separating more modules from the UI part so you will be able to exclude a lot of stuff you don't need, but so far it is not possible.

And, actually, for all projects I have seen so far - 5 MB is almost nothing considering the final size of the applications. So unfortunately I have never thought about reducing the library size.
User avatar
mgarin
Site Admin
 
Posts: 223
Joined: Mon Apr 16, 2012 1:01 pm
Location: Russia, Saint-Petersburg

Re: How to reduze the library size

Postby mgarin » Tue Sep 30, 2014 12:20 pm

So the short answer: there is no convenient way to reduce WebLaF library size and I really doubt there will be. I might be able to optimize some images/icons usage within the library but its still mostly the code weight.

Will mark this question solved.
User avatar
mgarin
Site Admin
 
Posts: 223
Joined: Mon Apr 16, 2012 1:01 pm
Location: Russia, Saint-Petersburg


Return to Questions

Who is online

Users browsing this forum: No registered users and 1 guest

cron