15 November 2017

Optimising firefox (one more time) : Profile to ramdisk


My firefox is setup to not use disk cache, just cache to ram.

But doing a bit of research on files accessed/written/read [1]

[1] 
# fatrace -s 30  -p 1392  | grep firefox
1392 is the lxterminal process

I found with this that firefox does a lot of noise indeed



Following the instructions on 

I set it up to use the profile from ramdisk and sync it from time to time to disk

About the sync.

- I created the cron job to sync every 2 hours (just in case of accidental shutdown)
- Added it to the lxterminal "custom startup services"  for my user
- Added to the  /usr/bin/lxde-logout   (I am the only user)
- Modified the script to don't require argument as follows


######################################################

### Checking if argument is provided
if [ "$1" != "" ]; 
then
    FFPROFILE="$1"
else
    echo "No argument supplied, using xxxxx.default"
    FFPROFILE="xxxxx.default"
fi


#### Setting things up
# static=static-$1
# link=$1
# volatile=/dev/shm/firefox-$1-$USER

static=static-$FFPROFILE
link=$FFPROFILE
volatile=/dev/shm/firefox-$FFPROFILE-$USER

######################################################

It does work much quicker, specially when closing down (no delay).
Too Cool for Internet Explorer