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

draft: v1 #3

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

draft: v1 #3

wants to merge 2 commits into from

Conversation

pivanov
Copy link

@pivanov pivanov commented Dec 8, 2024

Preact Performance Bridge

A lightweight bridge that enables React's advanced performance monitoring capabilities with Preact

Overview

Integration between Preact's efficient runtime and React's comprehensive development tools, offering the best of both worlds: Preact's small bundle size and React's powerful debugging capabilities.

Key Features

🚀 Preact as Primary Framework

  • Seamless integration with Preact's component model
  • Full compatibility with Preact's VNode structure
  • Zero overhead during production runtime
  • Graceful fallback for Preact-specific features

🔍 React DevTools Integration

  • Complete React DevTools support
  • Component hierarchy visualization
  • Props and state inspection
  • Performance profiling
  • Component filtering and search

📊 Advanced Performance Monitoring

  • Detailed render timing metrics
  • Component mount/update/unmount tracking
  • Tree impact analysis
  • Rerender cause detection
  • Performance bottleneck identification
  • Force update detection
  • Component tree overhead calculation

Technical Details

  • Uses WeakMap for efficient component timing storage
  • Implements React Fiber-compatible structures
  • Batches performance updates for optimal performance
  • Provides type-safe APIs
  • Supports both development and production environments

Copy link

vercel bot commented Dec 8, 2024

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

Name Status Preview Comments Updated (UTC)
bippy ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 14, 2024 0:32am

jest.config.js Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

we probably should just use vitest

Copy link
Author

Choose a reason for hiding this comment

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

oh ... for sure ... I just pick jst for no reason!


// Memoized tree duration calculation
const calculateTreeDuration = (node: VNode | any): number => {
try {
Copy link
Contributor

Choose a reason for hiding this comment

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

was the try block required?

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