Peer5 / ShareFest

Web based p2p file sharing built on WebRTC Data Channels API
1.68k stars 271 forks source link

High CPU load on page access #73

Open SunboX opened 10 years ago

SunboX commented 10 years ago

Ich someone accesses the index page, it has a high CPU load (94% on Raspberry Pi). So the page loads several seconds. Useless on a Raspberry Pi. I can't understand why, looks like a static page.

shacharz commented 10 years ago

The browser on the index page takes high CPU? or the server when and index page is loaded?

SunboX commented 10 years ago

The server when the page did load. Try to run it on a Raspberry Pi. They are cheap.

shacharz commented 10 years ago

Weird, someone used to run sharefest on RPi a while ago and said the CPU is incredibly low. Can you profile it?

SunboX commented 10 years ago

How do I profile it?

shacharz commented 10 years ago

Here are a few leads: http://blog.nodejs.org/2012/04/25/profiling-node-js/ https://nodetime.com/ http://blog.jetbrains.com/webstorm/2014/08/tracing-debugging-and-profiling-node-js-with-spy-js/