Skip to content

Conversation

@patilpratik1905
Copy link

@patilpratik1905 patilpratik1905 commented Oct 19, 2025

Improvisation 1 : Implemented dynamic Imports for mermaidjs

Affected File : MDX.tsx
While analyzing Lighthouse performance reports, I noticed that the Total Blocking Time (TBT) was significantly high.
Further breakdown showed two major contributors:

  1. Heavy JavaScript execution time
  2. Loading of unused JavaScript chunks

To address this, I analyzed the largest chunks impacting the main thread and identified one that primarily included Mermaid.js a visualization library that wasn’t required on all pages.

Implemented Changes

  • Replaced direct imports of mermaid.js with dynamic imports and conditional loading.
  • Ensured that only pages actually using Mermaid diagrams load the library.
  • Reduced unnecessary JS evaluation on pages that don’t require Mermaid.

Impact

  • Decreased JS execution time for non-Mermaid pages.
  • Reduced main thread blocking and improved TBT.
  • Prepared the foundation for similar optimizations across other large chunks.

Aim to bring TBT down from the current 500–600 ms range to around 150–200 ms and improving the overall performance of website

Linked Issue : #3186

Improvisation 2 : Font Performance Optimization

  1. Next.js Fonts Implementation
    Files Changed:
    utils/fonts.ts (new) - Inter & Work Sans config
    pages/_app.tsx - Apply font variables
    tailwind.config.ts - Update font families
    pages/_document.tsx - Remove Google Fonts links
    styles/globals.css - Add font-display: swap
    Performance Impact:
  • Eliminated render-blocking Google Fonts CSS
  • Reduced external requests from 3 to 0
  • Faster font loading with preloading
  • Better fallbacks with system fonts
  1. Fira Code Optimization
    Files Changed:
    styles/globals.css - Replace external import with self-hosted @font-face
    pages/_document.tsx - Add Fira Code preload
    tailwind.config.ts - Optimize mono font stack
    public/fonts/FiraCode-VF.woff2 (new) - Self-hosted font
    Performance Impact
  • Eliminated render-blocking external CSS import

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 19, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@netlify
Copy link

netlify bot commented Oct 19, 2025

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 829a1d2
🔍 Latest deploy log https://app.netlify.com/projects/asyncapi-website/deploys/6907a1ef920760000869f248
😎 Deploy Preview https://deploy-preview-4489--asyncapi-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@patilpratik1905 patilpratik1905 changed the title Improving Performance of Website improving performance of website Oct 19, 2025
@patilpratik1905 patilpratik1905 changed the title improving performance of website perf : improving performance of website Oct 19, 2025
@patilpratik1905 patilpratik1905 changed the title perf : improving performance of website perf: improving performance of website Oct 19, 2025
@asyncapi-bot asyncapi-bot added the bounty AsyncAPI Bounty program related label label Oct 21, 2025
@aeworxet
Copy link
Contributor

@asyncapi/bounty_team

@patilpratik1905 patilpratik1905 force-pushed the performance-optimization branch from ab501cc to 829a1d2 Compare November 2, 2025 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bounty AsyncAPI Bounty program related label

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

3 participants