npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

infinitable

v0.1.6

Published

高性能 canvas 表格引擎:多层 canvas 失效驱动渲染 + 全量虚拟滚动,10 万~100 万行性能不随数据量劣化,最小构建 gzip 仅 27KB

Readme

infinitable

高性能 canvas 表格引擎:多层 canvas 失效驱动渲染 + 全量虚拟滚动,为替代 VisActor VTable 而生。10 万到 100 万行数据下,首次渲染、滚动与写入性能不随数据量劣化,最小构建 gzip 体积仅 27KB。

单包发布(本包),内含五层能力:表格主体(core)、自研 canvas 渲染引擎(render)、官方插件集(plugins:图表/打印/水印)、电子表格核心(sheet:模型/命令/IO/SheetGrid 适配,经 infinitable/sheet 子路径导出)、公式引擎(formulas)。chart.js 等重组件按需动态分包,不进主产物。

安装

npm i infinitable

快速开始

import { ListTable, createRenderHost } from 'infinitable'

const container = document.querySelector<HTMLDivElement>('#table')!
const host = createRenderHost({ width: 1280, height: 720, container })

const table = new ListTable({
  width: 1280,
  height: 720,
  host,
  columns: [
    { field: 'name', title: '名称', width: 160 },
    { field: 'score', title: '分数', width: 100 },
  ],
  records: Array.from({ length: 100_000 }, (_, i) => ({ name: `行 ${i}`, score: i })),
})

数据三形态任选:records 数组 / model(如 SheetStore.asModel() 模型直挂,按格 O(1) 读写)/ rowCount + resolveDisplayValue 钩子。

核心特性

  • 虚拟窗口 O(1):构造与首次渲染只处理可视区,数据量 ×10 指标几乎不变(100 万行 TTFF 16.7ms)。
  • 多层 canvas + 区域失效:ground/body/media/sky 四层画布,滚动收敛为单条 band 失效,无全量重绘路径;拖滚动条大幅跳转不退化。
  • 模型直挂:SheetStore.asModel() 按格 O(1) 读写,免「批量写全量 setRecords 重放」绕法;batchUpdate 大块写收敛单次失效。
  • Excel 式交互:选区/填充/hover/行列 resize/键盘导航/触控惯性滚动/编辑器注册表/冻结/合并单元格。
  • 图表格位图路由:Chart.js 离屏出图经 cell 级 MediaCache LRU blit 上屏,滚动滚回命中直贴无闪。
  • 公式引擎:A1 解析/Pratt 求值/内置函数/依赖图增量重算,四则与聚合走精确计算(0.1+0.2 === 0.3)。

性能对比:infinitable vs @visactor/vtable

同一页面、同一数据(10 万 / 100 万行 × 20 列)、同视口,对称跑序取均值:

| 口径 | infinitable | VTable 1.26.8 | | -------- | ----------- | ------------- | | minified | 93.8KB | 2076.3KB | | gzip | 27.3KB | 514.8KB |

完整 20 项指标(TTFF/滚动 FPS/写入吞吐/整表重建,17/22 项领先 0 项落后)见 仓库 README。

License

MIT