Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any hope for a 4MB version? Since write now it's too big. #6

Open
SSadistic opened this issue Jan 9, 2017 · 7 comments
Open

Any hope for a 4MB version? Since write now it's too big. #6

SSadistic opened this issue Jan 9, 2017 · 7 comments

Comments

@SSadistic
Copy link

When I try to install it, I'm always running out of space.

@chron0
Copy link
Member

chron0 commented Jan 9, 2017

should be not a problem, there are no big assets and it's kept at minimum, let's see if the new approach after #4 is implemented fixes that as well, if not I'll look into it some more in terms of optimizing for size.

@chron0
Copy link
Member

chron0 commented Jan 10, 2017

There is still headroom in the css. Instead of putting the images base64 encoded into the css we can put them down as assets, it will increase loading time but will help with space constraints on 4MB devices. The fonts can also be cut down to carry only what we really need and we can pre gzip jquery.min down to 38kB.

After all, it's just a nasty process, the UI is hard to style and put into something user friendly. There are so many exceptions and hacks to get rid of all empty space, rows, br's and whatnot.

Ideally there should be no LuCI server generated html at all. A small angular2 based web client which communicates via websocket with UCI would be a much more efficient and elegant approach to go into the future.

@chron0
Copy link
Member

chron0 commented Jan 10, 2017

Source size

Initial release:

luci-theme-darkmatter $ du -sch . -> 476K

After first optimization:

luci-theme-darkmatter $ du -sch . -> 188K

Final Package size

Initial release: 138K
After first optimization: 68K

@chron0 chron0 closed this as completed in 660f997 Jan 10, 2017
@chron0 chron0 reopened this Jan 10, 2017
@chron0
Copy link
Member

chron0 commented Jan 10, 2017

@SSadistic could you please try again and see if you can install it (beta-2) now?

@weedy
Copy link

weedy commented Jan 10, 2017

https://forum.lede-project.org/t/openwrt-as-default-web-luci-theme/412/59
I don't know if you've seen all these comments.

@chron0
Copy link
Member

chron0 commented Jan 10, 2017

Yes, unfortunately, there is only talk and no PRs. Anyone can sit down and waste time in forums, bashing other people's attempts to move forward. Only by actually tackling the problems like this jquery dependency and luci under-the-hood workings we can get somewhere. Since it was only just released as a demo to see if people actually would like to have a darker interface for luci (there was none!) - it's only natural that things aren't heavily optimized and refined. The basic goal was to have something like material, that could deploy anywhere where material could run and go on from there.

@adil1214
Copy link

adil1214 commented Apr 7, 2019

hi from the future, i just tested it on a 4mb device with only 140kb available after a fresh firmware flash and it took about 84kb of free space.
the only problem i had is when trying to download over https using wget

wget https://apollo.open-resource.org/downloads/luci-theme-darkmatter_0.2-beta-2_all.ipk
wget: SSL support not available, please install one of the libustream-ssl-* libraries as well as the ca-bundle and ca-certificates packages.

as a workaround to this, i downloaded the package to my machine first then served it over an http server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants