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

🚅 chore: Added an Example of Nginx gzip Settings #3173

Merged
merged 2 commits into from
Jun 23, 2024

Conversation

ohneda
Copy link
Contributor

@ohneda ohneda commented Jun 23, 2024

Summary

I have added an example gzip settings to nginx.conf.

Details

LibreChat currently requires loading nearly 4MB of JavaScript before the initial screen is displayed, causing delays, especially on slower connections. To address this, I’ve added configuration options to compress transferred files in nginx.conf.

Refer to this documentation for more details:

Note that this PR does not include font or image compression, as they are typically already compressed and would offer minimal benefits relative to server load.

the Lighthouse metrics without gzip enabled:

b2 b4

the Lighthouse metrics with gzip enabled:

a2 a4

Transfer size without gzip enable:

b3

Transfer size with gzip enable:

a3

This configuration significantly reduces transfer sizes.

In the future, we might want to consider code splitting to improve the initial loading time. For now, this configuration should significantly improve performance.

Change Type

  • Chore - Added an example configuration
  • This change requires a documentation update

Testing

I have confirmed that the file transfer size is reduced when this setting is enabled.

Checklist

Please delete any irrelevant options.

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have commented in any complex areas of my code
  • I have made pertinent documentation changes
  • My changes do not introduce new warnings

@danny-avila
Copy link
Owner

thank you!

@danny-avila danny-avila merged commit c99cf1b into danny-avila:main Jun 23, 2024
2 checks passed
@danny-avila
Copy link
Owner

I agree, a more thorough review of the bundle size and how to optimize it is in order

kenshinsamue pushed a commit to intelequia/LibreChat that referenced this pull request Sep 17, 2024
BertKiv pushed a commit to BertKiv/LibreChat that referenced this pull request Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants