kokoko3k / gopreload Goto Github PK
View Code? Open in Web Editor NEWPreloads files needed for given programs.
Preloads files needed for given programs.
After a recent gopreload update/reinstall I noticed a lot more output in the logs. At first I was confused, because before the update it was rather minimal; only the initial startup messages were there.
I stumbled upon a discussion on the ArchLinux AUR page, where it turns out that there was a bug which caused mapandlock not to restart after the set period. Now with the fixed behaviour, mapandlock is restarting itself as intended and printing all those messages. If I get that right, mapandlock is reloading all those resources again every time in case they were discarded from the cache for some reason?
As it turns out, the previous "buggy" behaviour worked perfectly fine for me. I use gopreload to "preload" my desktop, making the transition between the display manager and the desktop smoother. Because of that I don't really need mapandlock to run every X amount of time.
Would it be possible to add a config option to make it behave like that? As in: run only once and don't keep mapandlock restarting. My current workaround of setting the LONG_DELAY option to something ridiculously high and redirecting the output to /dev/null don't seem like an elegant solution.
I am using artix-dinit and i want brave-browser and telegram-dekstop to preload, so dev can u please make a service for dinit plzz and also include instructions to enable that service :)
Hey there! I noticed this project and figured I'd have some questions as I haven't been able to find answers to them.
I feel like the answers to those questions could be included in the README.
Regards, Atrate
line 119 in main may lead to a buffer overflow if /tmp/listpreload.txt contains a line longer than 511 bytes. The line should be replace by (fgets(line, 512, file)) != NULL
. To improve code quality the magic number 512 should probably be a const.
Hi,
A/ I've installed gopreload that way :
Check dependencies : strace, coreutils are already installed
Download source code : $ cd /tmp && git clone https://github.com/kokoko3k/gopreload.git
Compile fmlock & install gopreload :
$ cd gopreload/usr/share/gopreload/fmlock.source/ && ./compile.sh
# mkdir -p /usr/share/gopreload/bin/
# cp /tmp/gopreload/usr/share/gopreload/fmlock.source/fmlock.gopreload /usr/share/gopreload/bin/
# cp /tmp/gopreload/* / -av
# rm -R /usr/share/gopreload/fmlock.source/
Allow non-admin to run gopreload daemon :
# chown my_username /usr/share/gopreload/enabled /usr/share/gopreload/disabled
Ask GOPreload to prepare preloading for Firefox :
Restart the system, then key :
$ /usr/share/gopreload/bin/Prepare.sh firefox
then press Enter once Firefox is fully launched.
(result on Firefox 46.0.1 : "1264 on 1264 done, will use 135MB to
preload them")
Activate GOPreload
# systemctl enable gopreload
B/ I've checked that GOPreload is working
$ systemctl status gopreload
● gopreload.service - gopreload: Preloads files needed for given programs.
Loaded: loaded (/usr/lib/systemd/system/gopreload.service; enabled)
Active: active (running) since lun. 2016-05-09 01:02:09 CEST; 12s ago
Main PID: 529 (StartPreload.sh)
CGroup: /system.slice/gopreload.service
├─ 529 /bin/bash /usr/share/gopreload/bin/StartPreload.sh
└─1930 sleep 300
$ ps -ef|grep preload
root 529 1 0 01:02 ? 00:00:00 /bin/bash
/usr/share/gopreload/bin/StartPreload.sh
ab 2202 2109 0 01:02 pts/0 00:00:00 grep preload
C/ Compare Firefox cold startup times with and without GOPreload
With GOPreload enabled
Keying '$ time firefox' and manually closing Firefox once it seems to be
fully launched :
real 0m14.235s
user 0m13.708s
sys 0m0.740s
With GOPreload disabled :
real 0m14.289s
user 0m13.656s
sys 0m0.776s
Thanks !
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.