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

GitAuto: A performance of a page (/settings/integrations/jira) is too slow. #141

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

gitauto-for-dev[bot]
Copy link

Resolves #133

Why the bug occurs

The /settings/integrations/jira page experiences poor performance primarily due to slow server-side responses from the get-installed-repos API endpoints. These requests are taking unusually long (ranging from ~800 ms to over 3 seconds), which significantly delays the overall page load time. Additionally, the page loads a substantial amount of resources (3.6 MB), which further contributes to the sluggishness.

How to reproduce

  1. Navigate to the /settings/integrations/jira page in the application.
  2. Open the browser's network console to monitor network requests.
  3. Observe that the page takes approximately 15 seconds to fully load.
  4. Notice that multiple get-installed-repos requests are taking over 800 ms each.
  5. Identify that the ping request also takes around 1.14 seconds, adding to the delay.

How to fix

  1. Optimize Server-Side Processing for get-installed-repos:

    • Review and enhance the database queries used in the get-installed-repos endpoints to ensure they are efficient.
    • Implement caching mechanisms to store frequently accessed repository data, reducing the need for repeated processing.
  2. Reduce Payload Sizes:

    • Analyze the data returned by get-installed-repos and remove any unnecessary fields.
    • Implement pagination or lazy loading to fetch repository data in smaller chunks rather than all at once.
  3. Improve Network Latency:

    • Evaluate the server's geographical location relative to the user base and consider deploying servers closer to users or using a Content Delivery Network (CDN) to decrease latency.
  4. Optimize Resource Loading:

    • Compress images and other large assets to reduce their size.
    • Minify CSS and JavaScript files to decrease load times.
    • Remove or defer loading of non-essential resources to prioritize critical assets.
  5. Implement Asynchronous Loading:

    • Load non-critical resources asynchronously to prevent them from blocking the rendering of the main page content.
    • Use techniques like code splitting to ensure only necessary JavaScript is loaded initially.
  6. Monitor and Profile Performance:

    • Continuously monitor the performance of the /settings/integrations/jira page using profiling tools.
    • Identify and address any new performance bottlenecks that may arise over time.

By implementing these fixes, the performance of the /settings/integrations/jira page should improve significantly, resulting in faster load times and a better user experience.

Test these changes locally

git checkout -b gitauto-wes/issue-133-20241214-153825
git pull origin gitauto-wes/issue-133-20241214-153825

Copy link

vercel bot commented Dec 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
gitauto-website ❌ Failed (Inspect) Dec 14, 2024 6:43am

Copy link
Author

gitauto-for-dev bot commented Dec 14, 2024

Committed the Check Run take-screenshots error fix! Running it again...

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.

0 participants