Painfully Slow Browser


21 posts
by devnull » Wed Feb 06, 2013 10:15 am
I've tried iceweasel (firefox), Chromium, dilo and finally settles on midori, which seems to have the least cpu and memory usage and appears to be the most lightweight.

I am using the browser in full screen, kiosk mod running directly from openbox (no lxde), there's no plugins tabs, or anything else just one window displaying html and pure javasscript.

Trouble is, it is so slooooow, the js code is only 1000 lines long (12kb when compacted) and is not really very large, but it is just all so slow.

Given that this is the lowest possible resolution screen, and that nothing else is running, that the CPU/GPU and memory are all pretty much available to the browser, I just can't understand how it can be so slow.

The same pages running on any other device (mobile phone, PC etc) does not show this same sluggishness, so why is this and can anything be done ??

The html5 ui is already there and working, if only it were a bit more sprightly ?!
> /dev/null 2>&1
Posts: 65
Joined: Sat Dec 24, 2011 7:46 am
by ghans » Wed Feb 06, 2013 10:26 am
Nothing on Rasbian is hardware accelerated ,
including the browsers. omxplayer is the only exception.
Thats why HTML5 video doesn't work either.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org
Posts: 4597
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany
by joan » Wed Feb 06, 2013 10:28 am
The Pi is not very powerful. Given the tendency of programs to become more resource hungry I doubt there is a solution. I use a similar powered machine as a home LAMP; I'd never use a browser on it.
User avatar
Posts: 5981
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK
by mikerr » Wed Feb 06, 2013 10:53 am
PI is as powerful as a phone - iphone 3gs is comparable specs wise, and phones can run browsers ok.

Have a look at some speed comparisons:
viewtopic.php?f=29&t=29353

Phones however, run software optimized for them, the Pi is running a fair bit of "desktop" software, which is one of the great things about it,
but it does have an ARM processor which is many times slower than a desktop processor.
Got a Pi Camera? View it in my android app - Raspicam Remote ! No software required on the pi
User avatar
Posts: 1250
Joined: Thu Jan 12, 2012 12:46 pm
Location: NorthWest, UK
by Cloudcentric » Wed Feb 06, 2013 11:35 am
I found Arch Linux Arm using Midori with Matchbox was slightly better response: http://archlinuxpi.blogspot.co.uk

I was considering whether a lighter Operating System like Slitaz, piCore or ****BSD may be better !!
I know everything about nothing"
Posts: 982
Joined: Fri Sep 14, 2012 9:13 am
by realbrucest » Wed Feb 06, 2013 11:41 am
Try netsurf-fb out of X environment.

Code: Select all
sudo apt-get install netsurf-fb


Yup, a bit buggy but not painfully slow ;)
Posts: 37
Joined: Sun Jan 01, 2012 11:03 pm
Location: Sevilla
by Cloudcentric » Wed Feb 06, 2013 12:05 pm
realbrucest wrote:Try netsurf-fb out of X environment.

Code: Select all
sudo apt-get install netsurf-fb


Yup, a bit buggy but not painfully slow ;)


Is Netsurf like Dillo3 a little lacking in up-to-date support for various HTML functions ??
I know everything about nothing"
Posts: 982
Joined: Fri Sep 14, 2012 9:13 am
by devnull » Wed Feb 06, 2013 1:20 pm
Cloudcentric wrote:I found Arch Linux Arm using Midori with Matchbox was slightly better response: http://archlinuxpi.blogspot.co.uk


Thanks, I installed arch and followed your guide, but when I try and run I get a 'cannot open display'

Did you install any additional drivers or edit config files that you may have omitted from the guide ??

Also, is the speed difference substantial, as the speed in Raspian is a show-stopper, it crawls and I have no LXDE loaded and nothing else running, I would have thought that with pretty much all of 700mhz and 75% free memory it should be usable, of course I don't expect it to be as fast as my PC.

Does arch support hardware acceleration for browsers ??

Is there any solution to this, or is this a hardware limitation that can never be solved with the existing hardware ??

PeterC
> /dev/null 2>&1
Posts: 65
Joined: Sat Dec 24, 2011 7:46 am
by devnull » Wed Feb 06, 2013 1:25 pm
I also tried installing netsurf-fb, but upon launching, I just get a blank screen:

netsurf-fb http://some.website.com

Are there other dependencies or is the command line wrong ??
> /dev/null 2>&1
Posts: 65
Joined: Sat Dec 24, 2011 7:46 am
by Cloudcentric » Wed Feb 06, 2013 2:19 pm
I followed the link page for Matchbox / Web Browser and it worked AOK

I found another guide here: https://github.com/MobilityLab/TransitS ... spberry-Pi
I know everything about nothing"
Posts: 982
Joined: Fri Sep 14, 2012 9:13 am
by devnull » Wed Feb 06, 2013 11:58 pm
Hi;

Thanks, still can't get the matchbox to run midori on a brand new fresh install, here's the precise step by step:

Clone the Card:
Code: Select all
dd of=/dev/rdisk2 if=//Volumes/340GB/archlinux-hf-2013-01-22.img bs=512m


Setup ARCH:
Code: Select all
## UPDATE S/W & F/W
pacman -Sy pacman
pacman-key --init
pacman -S archlinux-keyring
pacman-key --populate archlinux
pacman -Syu --ignore filesystem
pacman -S filesystem --force
sync
reboot

## INSTALL GUI & MIDORI
pacman -S xorg-server xorg-xinit xf86-video-fbdev xterm xorg-twm matchbox-window-manager matchbox-common ttf-dejavu nano midori gstreamer0.10-ugly-plugins
sync     
reboot

## CREATE START SCRIPT
read -d '' my_var <<"BLOCK"
#!/bin/sh
matchbox-window-manager &
midori -e Fullscreen -a http://www.google.com
BLOCK
echo "$my_var" > ~/mkiosk
chmod +x ~/mkiosk


Run The Script:
Code: Select all
[root@alarmpi ~]# ./mkiosk
matchbox: can't open display! check your DISPLAY variable.

(process:225): Gtk-WARNING **: Locale not supported by C library.
   Using the fallback 'C' locale.
Midori - Cannot open display:
[root@alarmpi ~]#


There has to be something missing ?!
> /dev/null 2>&1
Posts: 65
Joined: Sat Dec 24, 2011 7:46 am
by Cloudcentric » Thu Feb 07, 2013 12:05 am
I just ran pacman -Syu after a fresh install using the the 22-01-2013 IMAGE and followed the details on the page, do not know what all the extra configuration you have added, I am still a newbie !!

Maybe try luakit webbrowser ? http://mason-larobina.github.com/luakit it is in the Arch ARMv6 repository

In the morning will have another look at the web page and maybe undertake a fresh install time permitting!
I know everything about nothing"
Posts: 982
Joined: Fri Sep 14, 2012 9:13 am
by devnull » Thu Feb 07, 2013 12:38 am
Hi;

Thanks, no extra configuratons, I just followed the initialization steps here:

http://www.rpiforum.net/forum/tutorials ... pberry-pi/

the rest is the same other than using echo to create the startup file but the result is the same, there was one step missing and that was to make the file executable, but that's no big deal.

Unfortunately netsurf-fb is out as it does not support javascript, and that won't run anyway, despite adding the -b 16 command line option which appears to fix it for others ( http://forum.xbian.org/thread-129.html ), I just get a blank screen when I launch it, but the lack of javascript support rules that one out, shame as it seemed that may have been the answer !

So all in all I'm not having very much luck. I now have midori running on ARCH directly in X (not using matchbox as that won't start with display error above) the speed seems marginally faster than RASPIAN, however it is still very slow.

PeterC
> /dev/null 2>&1
Posts: 65
Joined: Sat Dec 24, 2011 7:46 am
by devnull » Thu Feb 07, 2013 7:35 am
OK, I know why I was getting the error, I was not launching it wit xinit, but instead calling the script directly.

I am now testing luakit, but does anyone know how to make it start full screen either through the config files or command line ??

I know that F11 will put it into fullscreen, but can't find out how to make it start full screen !

I have googled "luakit fullscreen" and clicked the first page of links, but no answers ???

Thanks

PeterC
> /dev/null 2>&1
Posts: 65
Joined: Sat Dec 24, 2011 7:46 am
by Cloudcentric » Thu Feb 07, 2013 7:56 am
Fresh install of latest image just updated pacman -Syu then followed the web page with the script for Midori:

IMG_0052.JPG
Midori Web Kiosk
IMG_0052.JPG (54.63 KiB) Viewed 7543 times
I know everything about nothing"
Posts: 982
Joined: Fri Sep 14, 2012 9:13 am
by Cloudcentric » Thu Feb 07, 2013 7:58 am
Then downloaded Luakit and change script

#!/bin/sh
matchbox-window-manager &
luakit

IMG_0053.JPG
Luakit Web Kiosk
IMG_0053.JPG (50.62 KiB) Viewed 7542 times
I know everything about nothing"
Posts: 982
Joined: Fri Sep 14, 2012 9:13 am
by Cloudcentric » Thu Feb 07, 2013 8:02 am
I believe it is only Midori which needs the Fullscreen switch, Iceweasel/Icecat, Luakit and Chromium do not as far as I am aware and without the switch Luakit launches full screen.

In Luakit press the o key too show the URL Bar bottom left, and it is definitely quicker than Midori, this was a good find by someone on this forum, thanks to whoever !
I know everything about nothing"
Posts: 982
Joined: Fri Sep 14, 2012 9:13 am
by devnull » Thu Feb 07, 2013 8:17 am
Hi;

Strange, I just installed luakit (archlinux) and when it launches, it has the top navigation bar, and a horrible black status bar along the bottom.

to get rid of the titlebar: matchbox-window-manager -use_titlebar no &

Now, just need to get rid of the status bar !!

Yes, it is definitely faster, but it's not full screen for me.

EDIT
===

Solved, status bar hidden with: w.sbar.ebox:hide() w.sbar.hidden = true added to window.lua

Yaaaay :-)
> /dev/null 2>&1
Posts: 65
Joined: Sat Dec 24, 2011 7:46 am
by Cloudcentric » Thu Feb 07, 2013 8:40 am
I know everything about nothing"
Posts: 982
Joined: Fri Sep 14, 2012 9:13 am
by devnull » Thu Feb 07, 2013 10:54 am
Hi;

Thanks, yes, I have solved both the top titlebar and the status bar at the bottom:

1) To get rid of the top titlebar use the "-use_titlebar no" command:
Code: Select all
matchbox-window-manager -use_titlebar no &


2) To hide the status bar at the bottom, add the following to ~/config/luakit/window.lua
Code: Select all
w.sbar.ebox:hide() w.sbar.hidden = true


Thanks

PeterC
> /dev/null 2>&1
Posts: 65
Joined: Sat Dec 24, 2011 7:46 am
by unclejed613 » Sat Feb 09, 2013 9:58 pm
if you are doing anything not requiring graphics or video, try lynx in a terminal window. it's a text only browser. but works great for looking stuff up on wikipedia and archive.org. the keyboard interface takes a bit of time to get used to.
Posts: 54
Joined: Sun Jan 15, 2012 10:49 pm