Notes From Steve Kinney's "React Performance" Frontend Masters Course
re: optimizations: "Start with a problem first, then solve it. dont go looking for problems."
"measure first before you optimize for performance. And then measure again."
| const parseJSON = () => | |
| new TransformStream({ | |
| transform(chunk, controller) { | |
| controller.enqueue(JSON.parse(chunk)); | |
| } | |
| }); | |
| const splitStream = splitOn => { | |
| let buffer = ""; | |
| return new TransformStream({ |
Notes From Steve Kinney's "React Performance" Frontend Masters Course
re: optimizations: "Start with a problem first, then solve it. dont go looking for problems."
"measure first before you optimize for performance. And then measure again."
| /** | |
| * A polyfill for `ReadableStream.protototype[Symbol.asyncIterator]`, | |
| * aligning as closely as possible to the specification. | |
| * | |
| * @see https://streams.spec.whatwg.org/#rs-asynciterator | |
| * @see https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream#async_iteration | |
| */ | |
| ReadableStream.prototype.values ??= function({ preventCancel = false } = {}) { | |
| const reader = this.getReader(); | |
| return { |
You are an agent - please keep going until the user’s query is completely resolved, before ending your turn and yielding back to the user.
Your goal is to complete the entire user request as quickly as possible. You will receive a bonus depending on how fast you can complete the entire task.
Follow these steps EXACTLY to complete the user's request: