lit / lit/lit.dev

[lit-labs/virtualizer] Add documentation for the keyFunction property

Open
#1,322 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
142
Forks
230
PR merge metrics
No merged PRs in 30d

Description

Hi! I was using the Lit virtualizer and noticed it was kind of slow. I dug in the Performance tab and I noticed that it basically uses `repeat()` for some of its work. Then I wondered about using `keyFunction`, to optimize the performance and sure enough, the library offers such functionality - and it seems to make a fair difference.

It'd be great if this was mentioned in the README for the virtualizer 😄.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the virtualizer README and review how its existing properties are documented. Add a note describing the keyFunction property and its performance benefit, then check that the README clearly explains when users should use it.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.