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

Long loading time, when use 90 or more languages #262

Closed
vodnicearv opened this issue Mar 31, 2019 · 21 comments
Closed

Long loading time, when use 90 or more languages #262

vodnicearv opened this issue Mar 31, 2019 · 21 comments
Labels

Comments

@vodnicearv
Copy link

vodnicearv commented Mar 31, 2019

Version

v5.8.5

Reproduction link

Not really needed

Steps to reproduce

  1. Create an app.
  2. Add 10-20 routes.
  3. Add 100 languages.

What is expected ?

Spped!

What is actually happening?

Slow loading app.

Additional comments?

What options (settings) is recoomend to use when in app is 92 languages?
Due to the fact that a huge number of routes (routes) are generated, each page is loaded for a very long time.

Can I somehow solve this problem?

For example, to make so that the routes are not automatically generated for each language ...
Thank you in advance.

This bug report is available on Nuxt community (#c222)
@ghost ghost added the cmty:bug-report label Mar 31, 2019
@vodnicearv
Copy link
Author

Maybe this pull request solve this problem?

@vodnicearv
Copy link
Author

My nuxt.config.js:

modules: [
    [
      'nuxt-i18n',
      {
        defaultLocale: 'en',
        strategy: 'prefix',
        detectBrowserLanguage: {
          useCookie: true,
          alwaysRedirect: true,
          cookieKey: 'user_language'
        },
        seo: true,
        lazy: true,
        parsePages: true,
        vuex: {
          moduleName: 'i18n',
          mutations: {
            setLocale: 'I18N_SET_LOCALE',
            setMessages: 'I18N_SET_MESSAGES'
          },
          preserveState: false
        },
        langDir: 'locale/',
        locales: [...]
      }
    ]
  ]

@vodnicearv
Copy link
Author

Any Ideas?

@stale
Copy link

stale bot commented Jul 31, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jul 31, 2019
@vodnicearv
Copy link
Author

@paulgv hello,
will it be possible to solve this problem in future versions?

@stale stale bot removed the wontfix label Jul 31, 2019
@sowinski

This comment has been minimized.

@rchl
Copy link
Collaborator

rchl commented Sep 14, 2019

@sowinski with lazy option enabled, only one (or max 2) languages are loaded.

@vodniciarv does no_prefix strategy fix your problem?

Also seo: true` can cause performance issues, depending on your page complexity.

@sowinski

This comment has been minimized.

@rchl

This comment has been minimized.

@sowinski

This comment has been minimized.

@sowinski

This comment has been minimized.

@rchl

This comment has been minimized.

@sowinski

This comment has been minimized.

@sowinski

This comment has been minimized.

@sowinski

This comment has been minimized.

@vodnicearv
Copy link
Author

vodnicearv commented Oct 23, 2019

@vodniciarv does no_prefix strategy fix your problem?

@rchl yes, but we need prefix strategy

@vodnicearv
Copy link
Author

As I understand it, is necessary to build routes differently in the .nuxt/router.js file

@vodnicearv vodnicearv changed the title Long time for loading when use 90 or more languages Long loading time, when use 90 or more languages Oct 25, 2019
@stale
Copy link

stale bot commented Dec 24, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Dec 24, 2019
@stale stale bot closed this as completed Dec 31, 2019
@vodnicearv
Copy link
Author

Any ideas to solve it issue?

@rchl
Copy link
Collaborator

rchl commented May 26, 2020

This was never analyzed properly so not sure exactly what was the problem here but it's likely the same as #690

@nelsonlarocca
Copy link

did you solve the issue ?
Prefix or not prefix should not be a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants