Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transfer of the various messages.properties files takes 2 to 3 seconds of walltime #264

Closed
nickdos opened this issue Jun 25, 2018 · 9 comments
Assignees
Milestone

Comments

@nickdos
Copy link
Contributor

nickdos commented Jun 25, 2018

From @ansell on February 16, 2017 22:33

Search result page loads have a component of time totalling about 2 to 3 seconds where there are sporadic requests for a range of messages.properties/messages.en.properties/messages_en_US.properties files. If this process were streamlined it would increase the usability of the website.

Copied from original issue: AtlasOfLivingAustralia/ala-hub#16

@ansell
Copy link
Contributor

ansell commented Jun 25, 2018

screen shot 2018-06-25 at 10 53 03 am

See this screenshot of the timings (possibly not all of the time around messages.properties are related to them)

@ansell
Copy link
Contributor

ansell commented Sep 17, 2018

The messages.properties files are unable to be cached due to the cache-busting parameters, so the extra time caused by these calls impacts every page load on biocache.ala.org.au and the thin hubs.

nickdos added a commit that referenced this issue Nov 7, 2018
JS i18n fixes.
@nickdos
Copy link
Contributor Author

nickdos commented Nov 7, 2018

FYI, commit f84b317 added a 'cache' option that fixes the cache-busting issue. I also fixed the double loading of messages.properties on search pages and added the async option to stop modern browsers from complaining and to speed page loading.

@ansell
Copy link
Contributor

ansell commented Nov 7, 2018

The messages.properties files are not cache-busting anymore, based on testing this on biocache-test.ala.org.au, but they aren't marked as cacheable by browsers. The other js resources are successfully using If-Modified-Since and Last-Modified headers for browser level caching.

The duplicate queries have been fixed and the total page is down from 2.4MB (749KB gzipped) to 2.04MB (620KB gzipped) so overall definitely an improvement

There was a reference to cache: false in the commit above, was that meant to be cache: true?

f84b317#diff-86d6a358349ac5abf2c98b5331271472R65

The main difference since the last timing analysis, is the dependency on s3.amazonaws.com for the freshdesk widget. This website seems to have a close to 0ms TTL on their DNS, which in effect seems to require a DNS query for an average of 2 out of the 3 resources, although it seems like they are asynchronous, so they aren't interfering with the total timeframe as much as it looks:
screen shot 2018-11-07 at 3 55 48 pm

screen shot 2018-11-07 at 3 54 42 pm

@nickdos
Copy link
Contributor Author

nickdos commented Nov 7, 2018

@ansell not sure where the reference to false was but it should be cache: true.

EDIT: async should be true as well. Will fix that.
EDIT: done - commit 9478b12

@ansell
Copy link
Contributor

ansell commented Nov 7, 2018

The first messages.properties request is now interleaved, so this issue can be closed. The freshdesk widget is the biggest time factor now, other than optimising the initial page load which is currently at 2.6 seconds for the default search.

screen shot 2018-11-08 at 9 25 56 am

Should I open a new issue specific to ala-hub for the freshdesk widget optimisation in the future, given it isn't relevant to biocache-hubs?

@ansell
Copy link
Contributor

ansell commented Nov 7, 2018

Closing this as fixed based on testing. Opened an issue for freshdesk specifically at AtlasOfLivingAustralia/commonui-bs3#2

@ansell ansell closed this as completed Nov 7, 2018
@nickdos nickdos added the IAD label Nov 15, 2018
@sylvain-morin
Copy link
Contributor

Hi,

Caching of message.properties is not (no more?) active.
My browser spend around 5 seconds to download them on each page I see on ALA Portal.

I activated the caching on my portal (openobs.mnhn.fr) and I don't have this issue.
https://github.com/AtlasOfLivingAustralia/biocache-hubs/blob/develop/grails-app/assets/vendor/jquery.i18n.properties.js#L65

Regards,
Sylvain

image
image

@nickdos
Copy link
Contributor Author

nickdos commented Oct 19, 2020

Thanks @sylmorin-gbif - will take a look at this regression.

@nickdos nickdos reopened this Oct 19, 2020
@nickdos nickdos added the bug label Oct 19, 2020
adam-collins pushed a commit that referenced this issue Jan 29, 2024
@adam-collins adam-collins assigned adam-collins and unassigned nickdos Jan 29, 2024
@adam-collins adam-collins added this to the 7.0.0 milestone Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants