High CPU Usage on Desktop Website

I noticed today that the iNaturalist website is really working my CPU in a way that there is no legitimate reason for it to be.

In response to requests on these forums for people to ID more plants, I’ve been spending a good amount of time daily identifying plants. Typically what I do is to go to the “identify” screen, limit myself to a particular species or broader taxon, and a region, usually the Mid-Atlantic states, and then from there I open a whole bunch of observations in new tabs, so that I can go through them one-by-one.

I have been shocked at the CPU usage. I have an 8-core processor and often if I open many (10 or more) tabs at once it engages all my CPU’s and total usage is well in the multiple hundreds of percents. This makes my laptop’s fan start chugging and causes it to draw a lot of power.

This is incredibly wasteful. All I’m trying to do is open a webpage and look at images…there is no need to use this much CPU, given the amount of content is on the page. I was curious to compare this to a site with similarly complex pages that I designed, and I went over there and opened 10 tabs of pages of similar complexity. The amount of information on the page is slightly less, but the pages are comparable overall. Not only did they load faster, the CPU was doing much less work. I could open 10 pages at once and the CPU usage stayed under one full core total, with a single core engaging <50%, and settled back to near-zero usage much faster. It didn’t cause my fan to turn on either.

I started looking more carefully, and I realized that even really minimal actions on the iNaturalist website really work the CPU hard. For example, clicking “agree” on an observation, something that I would expect to involve almost no CPU usage, causes quite a lot of CPU usage. Even opening a single observation often sends the CPU usage up over 50% and takes as long to settle down as it took 10 tabs on this other site to settle down.

As iNaturalist is used by lots of people, this CPU usage is going to add up and contribute to wasted electricity usage and carbon emissions.

What the heck is the website doing that it is wasting so much CPU? And what can we do to get this addressed? This is really bad.

This stuff matters. I would like to see this addressed somehow.

Besides the electricity usage issue, it also slows down my use of the site considerably. Given that I have an extremely high-end laptop that is brand spanking new…I can’t imagine how much this could hinder the accessibility and usage of the site for people using the site on more humble hardware.

This is also an issue of concern…both because it could limit the site’s usability for people without high-end hardware, and because it could limit the speed with which people use the site, which could reduce the amount of data and engagement we have. There is persistent feedback that iNaturalist needs more people doing ID…so it would make sense to make it as easy, accessible, and seamless to do so as possible, especially when it comes to things where there is no objective reason for the site to be as cumbersome on the CPU as it is.

I’m using Chrome 75 for reference. Out of curiosity and to help troubleshoot, I also tested things out in Firefox and things were worse, not better, and I also tested things out when not logged on (to try to check whether or not it was the notification system or other features only activated by logged on users causing the problem) and there was no appreciable change.

6 Likes

I’m not sure why this is flagged – is it in the wrong place on the forum?

I would also like to see this issue addressed. The website and the app are both a lot slower than it seems like they should be.

4 Likes

I would be curious to know as well… I would think this is a very valid topic to be discussing here.

3 Likes

The original post contained an unnecessary aside that implied the site was not competently programmed, so it was flagged. An aside like that wasn’t particularly conducive to a constructive conversation. I’ve messaged the original poster about it. To be clear, it wasn’t flagged because it was a critique of iNat (which is fine), but because of that particular language. We want conversations to be constructive here, and address the issues. If you have any concerns about it being flagged, feel free to message @moderators, or myself directly.

OK, all that being said, the Identify page is definitely resource hungry and it’s something we’d like to improve. I’m not one of the developers so I can’t really speak to why it uses more resources than it does, alas. But it’s a pretty complex page.

Keeping in mind that we’re a small team and updates may take time, offer suggestions if you have any, and I also want to remind anyone with programming skills that our code is open source so you can take a look yourself. Here’s our page for developers. Also, helpful information like URLs, screenshots of the web console, or anything would be…well, helpful. :-)

8 Likes

Thought that it might be something like that!

Interestingly, it appears that the flagged first port makes it so that the whole topic is not accessible by others? I can’t find it in the recent topics list, but receive “alerts” from having set a watch soon after it was posted.

@cazort If you edit out the emotive content of the post, it might help get it visible to more people

3 Likes

I mostly have older equipment, the newest being a refurbished panasonic toughpad fz-g1 with external monitor and keyboard, win 10. On the whole this machine is fast enough for most things, but does struggle if I try and open multiple windows. Most notably a problem when dealing with iNat alerts, as they all need to be opened at once, or they are lost. I have a further problem in that the machine shuts down with no warning (nothing in the logs) presumably due to over heating and a thermal protection of some sort. It is a race to get all the tabs open, so that if it does crash, at least they all will re-open again when I restore the browser after starting up again. Some days this can be 4 to 5 crashes… I have had a response from panasonic, but because I purchased it privately some time ago, no warranty is in effect. A technician at panasonic kindly offered that I could send the machine to him and he would take a look, but with no guarantee of being able to fix it, no inidication of what the cost would be, no indication of how long it would be away for, and I am in a situation where I can’t afford the return freight, let alone the repair cost and/or time out of action.

I do have a much older machine, win95/chrome and it does work, but forget opening multiple tabs.

My iNat usage at present is in a very reduced state, as from September through December I will be requiring my PC and iNat to undertake observations in a paid capacity (however not sufficiently paid enough to be able to shell out for new equipment), so I am very much not wanting to risk either the computer or my iNat account for that matter.

So for me, this matter is of extreme interest! Anything that can reduce the stress on my poor not-so-toughpad would be a very welcome change!

1 Like

On my computer, I don’t think I’m seeing iNat using any more resources than several other webpages I viewed (while viewing CPU usage). I looked at MSNBC, New York Times, and a few others. When the pages load, Firefox hits near 100% CPU usage on all those sites, then fluctuates between 0% and 10%. Inat does the same, even when I have 12 observation tabs open from the Identify page.

yeah, i find that if i leave the identify page open for a long time, like many days, that can slog things down, otherwise it is similar to other websites such as google mail/maps. Of course, if there are ways to make it run faster and more efficiently without losing functionality i am all for it.

Here’s the results of my test. For various websites, I opened Firefox, went to the webpage, and very quickly opened up 10 tabs from links on the page. Looks like iNat is about the same as Smithsonion’s website. NPR’s website is a much bigger CPU hog. For iNat, I went to Identify and opened up 10 observations.
https://docs.google.com/presentation/d/1OdWdy0N6TDi0D_RXAmuYtOb_uT4X6G5_dOIX7inm_j0/edit?usp=sharing

Well there are certainly several not optimal pages on the internet … question is how to improve this one! https://www.inaturalist.org/pages/developers

Not saying iNat isn’t slow (there’s a whole topic about ways to optimize use for areas with poor internet connections), but as per the above anecdotes I also find my computer works similarly hard when I have a ton of tabs open regardless what website it is. Why not use the Identify page to add IDs to multiple obs in a single tab? https://www.inaturalist.org/pages/video+tutorials#identify

6 Likes

What should be the target for CPU usage for iNat (or any website)? 0%, 1%, 2%? Is there an agreed upon target that webdesigner organizations encourage folks to strive toward?

When I’m identifying from the Identify page, I never open up any tabs.

2 Likes

to be fair, the iNaturalist website is doing a lot, has a lot of graphics, and it seems to be built in a way to allow for maximum configurability and modularity (think different languages, API to allow for different UIs, etc.). so i don’t think the way it performs is that bad considering all that.

that said, there are always ways to make things a little more efficient (assuming there is the manpower to do so). for example:

  1. if you open up an observation detail page, there are “More from [observer]”, “Nearby observations”, and “Observations of relatives” sections that i bet most people never use. maybe if there was an option to collapse these sections and make the stuff load only if expanded, that could save on resources a bit.
  2. when i had a really slow internet connection, i really hated when someone identified something to a really high level (ex. plants) because it would always take extra time to load (the stuff for) all the extra little points in the map for nearby (plant) observations. i think there was a suggestion at some point to add a little switch to allow someone to see nearby observations or not, and something like that might help.
  3. it looks like the average observation detail page has maybe 1-2MB worth of pictures and other stuff to download. but it also looks like for each tab that’s opened, there’s 1.5MB worth of fonts downloaded (including maybe a duplicate?) and 2MB worth of system code loaded. there might be ways to chop things up into smaller pieces or cache stuff better or share stuff between tabs better. (but all that takes manpower.)

if someone really wanted to, there’s nothing that prevents a person from creating a more streamlined version of the iNaturalist website (via the API) that could run faster because it does less. or i bet you could even help to streamline the core iNat code, if you have the coding ability and time and don’t mind working for free. it would probably be a good thing anyway to have more than just a handful of people who understand the code just in case…

5 Likes

Well not every observation is of an easy to identify organism, and not every iNaturalist photo shows the organism sharp and in adequate size. I often look at all uploaded photos at fullscreen to check all visible characters before identifying something to species or lower rang. I also like to compare existing research grade observations and need ID observations of a certain area and taxonomic group, which means i barely ever use the Identify page.

2 Likes

Do you mean those tiny thumbnails? I’m referring to opening up the Identify modal where you can view images much larger.

3 Likes

bouteloua, i have no clue what you mean with identify modal …
the identify page i am talking about is this one https://www.inaturalist.org/observations/identify
As i told you i barely use it.

This tutorial helps explain how you can view the images larger within the Identify page rather than opening a new tab: https://www.inaturalist.org/pages/video+tutorials#identify (referred to as pop-up)

3 Likes

As this page does not show all available observations of the chosen area and taxonomic group, i do not really consider it helpful. Thanks for the video link though.

I use it all the time to view all the available observations of the chosen area and taxonomic group. You just have to use the filters to include Research Grade, Casual, reviewed observations, etc in the results.

3 Likes