Repository navigation
Conversation
|
@askov is attempting to deploy a commit to the Solana Foundation Team on Vercel. A member of the Team first needs to authorize it. |
|
314d7f6 to
ae00b36
Compare
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
question: why do we need this HOO-611 file?
There was a problem hiding this comment.
A bad name for a helper, renamed
| '6dNUCJLdccKGSSQvQDNvQMKfWiV5j3XSTTGqNsCJ8mSA', | ||
| '4QUZQ4c7bZuJ4o4L8tYAEGnePFV27SUFEVmC7BYfsXRp', | ||
| ] as const; | ||
| const ACCOUNTS = [1, 2, 3, 4, 5, 6].map(seed => gen.address(seed)); |
There was a problem hiding this comment.
nit:
| const ACCOUNTS = [1, 2, 3, 4, 5, 6].map(seed => gen.address(seed)); | |
| const ACCOUNTS = [...Array(6).keys()].map(i => gen.address(i + 1)); |
There was a problem hiding this comment.
Hm, I would keep it as is, more readable imo. But I don't have any strong objections against your variant. Ping me if you still think it's worth it
| import { gen } from '@__fixtures__/gen'; | ||
| import { Transaction, TransactionInstruction } from '@solana/web3.js'; | ||
|
|
||
| export function makeTx(): Transaction { |
There was a problem hiding this comment.
question: should we make it a global shared helper?
There was a problem hiding this comment.
I think not yet, two usages in the same folder. This PR is mostly about the speed/duplication problem, not about the perfect structure/code quality..
| }); | ||
| }); | ||
|
|
||
| async function runningTimers<T>(pending: Promise<T>): Promise<T> { |
There was a problem hiding this comment.
nit: may be rename into runAfterAllTimers, or awaitAllTimers, not sure. But runningTimers name doesn't say anything to me.
There was a problem hiding this comment.
I agree, inlined it, can't come up with a good readable name, so maybe we don't need it at all
Every spec file created a jsdom window, which costs about half a second per file. A `.ts` spec runs in node unless it declares `// @vitest-environment jsdom`, and specs run in worker threads. The spec suite takes 37 s instead of 75 s.
Node 22.1 to 22.6 read `--eval` input as CommonJS, so top-level await throws before the pipeline imports run.
ae00b36 to
9eec314
Compare
Description
A
.tsspec runs in node instead of jsdom, and each spec file runs in a worker thread. The spec suite takes about half the time.Speed
vitest runTest specs, slowest shardTest specs, four shards added upLocal numbers are the mean of two runs each, at 7e25002. CI before is the median of 52 green PR runs since 2026-09-29. CI after is the mean of this PR's two runs. The wait for all checks stays the same, because
Build-Infostarts afterBuild-And-Testand finishes last.Changes
specsVitest project intospecs-domfor.tsxspecs andspecs-nodefor.tsspecs..tsspec in jsdom only when its first line is// @vitest-environment jsdom.threadspool for the spec projects.server.deps.inlinelist fromvite.config.mts.it.eachtables.date-fnsfunctions from subpaths.formatAnchorIdlandformatCodamaIdlfrom their hooks.Type of change
Screenshots
No UI change.
Testing
pnpm exec vitest list --filesOnly --project specs-dom, then the same with--project specs-node. Expect each spec file outsidepackages/in exactly one list.pnpm test:ci:specsonmasterand on this branch. Expect about half the wall time on this branch.Related Issues
Closes HOO-1913
Checklist
pnpm test,pnpm lint,pnpm typecheck)build:infoscript to update build information