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. #136

Open
wants to merge 3 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 slow performance primarily due to pending network requests. Specifically, WebSocket connections remain in a Pending state, preventing the page from fully loading and rendering efficiently. Additionally, some fetch requests have varied response times, contributing to the overall sluggishness of the page.

How to reproduce

  1. Navigate to the /settings/integrations/jira page within the application.
  2. Open the browser's developer tools and select the Network tab.
  3. Observe the list of network requests being made as the page loads.
  4. Notice that certain WebSocket requests have a status of 101 and remain in a Pending state.
  5. Additionally, observe that some fetch requests take an unusually long time to complete, affecting the page's load time.

How to fix

  1. Optimize WebSocket Connections:

    • Review the implementation in use-websocket.js and useIntegrations.ts to ensure WebSocket connections are correctly established and terminated.
    • Implement proper error handling and reconnection strategies to prevent connections from remaining in a Pending state.
  2. Improve Fetch Request Efficiency:

    • Analyze the fetch requests in useIntegrations.ts to identify and eliminate any redundant or unnecessary calls.
    • Implement caching strategies where appropriate to reduce the number of requests and improve response times.
  3. Introduce Timeout Mechanisms:

    • Add timeout settings for both WebSocket and fetch requests to avoid indefinite waiting periods.
    • Ensure that the application gracefully handles timeout scenarios by providing user feedback and retry options.
  4. Refactor Integration Loading Logic:

    • Streamline the data fetching processes within the app directory to enhance overall performance.
    • Utilize asynchronous loading and code-splitting techniques to load only the necessary components and data when required.
  5. Update Configuration Settings:

    • Adjust performance-related configurations in next.config.mjs to optimize the Jira integration page.
    • Ensure that any performance optimizations are in line with best practices and do not compromise functionality.

By addressing these areas, the performance issues on the /settings/integrations/jira page can be significantly mitigated, resulting in a smoother and more efficient user experience.

Test these changes locally

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

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 5:13am

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