简体   繁体   中英

Web Interface on the Raspberry Pi

I have a web application that I developed for use on a Raspberry Pi written in Python and hosted on nginx. It's a bit slow to serve new pages, even when there is very little to no logic being processed for the page that's loading (4-5 seconds+).

I know that's a common problem as Pi's aren't exactly equipped to handle the load required to deliver web pages super quickly, but I was wondering if anyone had any experience with this and if it would be worthwhile to recreate the app in some other environment? I was wondering if perhaps a nodejs server would be significantly (a few seconds) quicker in general, or building a single page application using react would be worthwhile? Or if there is some other solution that would be even faster?

EDIT:

more info: raspberry pi 3, json for storing/reading data (very small amounts of data), running chrome, only one user interacting directly with the app, and on the device itself (not from the internet or another network)

If the frontend will run on a browser executed on a laptop o desktop it will run fine, but if the interface will run on a browser executed on the Pi maybe it will be too expensive in terms of GPU/CPU usage and it will require fine tuning in order to avoid unnecessary re-renders. So if the browser is on a remote machine ok, if not think about a something like TkInter for UI.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM