HumanRightsMeasurementInitiative / hrmi-dataportal

https://rightstracker.org
Other
4 stars 8 forks source link

Very slow on MS Edge browser #32

Closed tmfrnz closed 4 years ago

tmfrnz commented 5 years ago

From @annemariebrook via email

The computer in the seminar room we were in had internet explorer as the default browser and we noticed that the data portal did not load on that browser. We just switched to chrome, but I thought I’d let you know.

tmfrnz commented 5 years ago

@annemariebrook I could not reproduce this here error on Edge or Internet Explorer (emulating version 8-11)

Would you be able to let me know the IE version they were using? If not it would be helpful if you and your team could try running this on any IE browser any of you may have installed

tmfrnz commented 5 years ago

@annemariebrook via email:

We have a few times found (on other people’s computers) that the portal does not display on an Explorer Browser (I’m sorry I don’t have any further details on this, as it has usually happened in front of a group of people, and we’ve just switched to Chrome and not investigated further).

tmfrnz commented 4 years ago

Closing for now as not reproducable

EDIT: see #91 for more details on this issue

tmfrnz commented 4 years ago

Via email

Hi - I'm trying to view the data portal on your HRMI website but it's not working. Thought you'd like to know so you can fix.

and

Still can’t get it to load. I’m using Internet Explorer from a desktop

tmfrnz commented 4 years ago

It appears that the portal takes a very very long time to load on Edge, as well as emulations of earlier IE versions.

The portal is currently only configured to support IE11 and later but can maybe try to include IE10

tmfrnz commented 4 years ago

A few notes

tmfrnz commented 4 years ago

Here is a comparison of CPU usage over time for MS Edge and Chrome browsers. It is also interesting to look at the other data:

image

image

tmfrnz commented 4 years ago

Here the CPU profile for Edge with data processing disabled. It becomes clear that the issue is not related to file size and loading times

image

tmfrnz commented 4 years ago

Testing on browserstack.com (time to load, process and render data)

tmfrnz commented 4 years ago

Here a timeline of events loading the overview page on MS Edge, showing that most time is lost between successful load and data availability in the local store:

image

tmfrnz commented 4 years ago

For comparison, on Chrome this is almost instant

image

tmfrnz commented 4 years ago

Likely culprit is the helper function "indicatorScoresByCountry" https://github.com/HumanRightsMeasurementInitiative/hrmi-dataportal/blob/master/app/containers/App/selectors.js#L1170

It is currently only used for sorting countries on the overview page by number of available indicators so could refactor this function or ignore indicator count for now

It does not only take a considerable amount of time to execute in Edge (~6s) but also is executed multiple times in Edge

tmfrnz commented 4 years ago

While aforementioned function ("indicatorScoresByCountry") is also much slower in Edge and IE11, it turns out that the built-in array sort function in Edge and IE11 was the main performance issue.

Having only lazily used it for figuring out the data date ranges, I have replaced it with a more basic but more efficient function.

annemariebrook commented 4 years ago

Great. Thanks for figuring this out.

From: Timo Franz [mailto:notifications@github.com] Sent: Tuesday, 5 November 2019 1:15 AM To: HumanRightsMeasurementInitiative/hrmi-dataportal hrmi-dataportal@noreply.github.com Cc: Anne-Marie Brook Anne-Marie.Brook@motu.org.nz; Mention mention@noreply.github.com Subject: Re: [HumanRightsMeasurementInitiative/hrmi-dataportal] Very slow on MS Edge browser (#32)

While aforementioned function ("indicatorScoresByCountry") is also much slower in Edge and IE11, it turns out that the built-in array sort function in Edge and IE11 was the main performance issue.

Having only lazily used it for figuring out the data date ranges, I have replaced it with a more basic but more efficient function.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/HumanRightsMeasurementInitiative/hrmi-dataportal/issues/32?email_source=notifications&email_token=AF3BASJXMHLZVRI2ZPEMY53QSAG2XA5CNFSM4HQAQCR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEC7BHEY#issuecomment-549327763, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AF3BASMAH57FEBJWKYQY7RDQSAG2XANCNFSM4HQAQCRQ.