Skip to content

Add Vitarx framework implementation#1979

Open
zhuchonglin wants to merge 1 commit intokrausest:masterfrom
zhuchonglin:add-vitarx
Open

Add Vitarx framework implementation#1979
zhuchonglin wants to merge 1 commit intokrausest:masterfrom
zhuchonglin:add-vitarx

Conversation

@zhuchonglin
Copy link

Add Vitarx 4.0.0-beta.0 (keyed) framework benchmark

Summary

This PR adds a benchmark implementation for Vitarx framework version 4.0.0-beta.0 in the keyed category.

Implementation Details

The implementation includes:

  • Framework Version: Vitarx 4.0.0-beta.0
  • Category: Keyed (using the For component with key="id")
  • Build Tool: Vite 8.0.0-beta.16 with @vitarx/plugin-vite 0.0.1-alpha.2

Key Features

The implementation uses Vitarx's core features:

  • Reactive State Management: Uses ref and shallowRef for reactive state
  • List Rendering: Implements the For component with keyed rendering for efficient list updates
  • JSX Syntax: Uses JSX for component templates

Benchmark Operations

All standard benchmark operations are implemented:

  1. Create 1,000 rows - Initial data creation
  2. Create 10,000 rows - Large dataset creation
  3. Append 1,000 rows - Adding rows to existing data
  4. Update every 10th row - Partial data updates
  5. Clear - Remove all rows
  6. Swap Rows - Swap two rows (positions 1 and 998)
  7. Select Row - Highlight selected row
  8. Remove Row - Delete individual row

File Structure

frameworks/keyed/vitarx/
├── src/
│   ├── App.jsx      # Main application component
│   ├── data.js      # Data generation utilities
│   └── main.js      # Application entry point
├── index.html       # HTML template
├── package.json     # Dependencies and scripts
└── vite.config.js   # Vite configuration

Testing

The implementation follows the benchmark's standard patterns and should integrate seamlessly with the existing test infrastructure. All operations are optimized for performance using Vitarx's reactive system and keyed list rendering.

Changes

  • Added new framework directory: frameworks/keyed/vitarx/
  • Implemented all benchmark operations using Vitarx 4.0.0-beta.0
  • Configured Vite build system with Vitarx plugin
  • Added framework metadata to package.json

Notes

This implementation uses the keyed mode of Vitarx, which provides optimal performance for list operations by maintaining a 1:1 relationship between data items and DOM nodes using unique identifiers.

@zhuchonglin zhuchonglin force-pushed the add-vitarx branch 4 times, most recently from 387988c to 99dac45 Compare March 1, 2026 19:50
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.

1 participant