500 Clocks Packed into a 6.3MB Single HTML File: Opus 5.5's Frontend Stress Test

500 clocks packed into a 6.3MB single HTML file, testing browser rendering limits and the model's long-code generation capability.
The project packs 500 independent clocks into a single 6.3MB HTML file, averaging about 12.6KB per clock, embodying the single-file idea of trading size for deployment convenience. On performance, the key is to replace 500 independent timers with a unified requestAnimationFrame loop and restrict animations to transform and opacity to go through GPU compositing layers; otherwise the main thread and event loop will be overwhelmed. The "by Opus 5.5" in the title points to a generative code experiment: the model must maintain syntactic correctness and logical self-consistency at a multi-MB scale, which is far more difficult than generating example code. The single-file approach suits demos, offline tools, and quick sharing, but size, maintainability, and cache granularity are the main limitations, and there is still a gap before engineering implementation.
What Does It Mean to Fit 500 Clocks in One HTML File?
In the Show HN section of Hacker News, a project titled "500 clocks in one 6.3 MB HTML file by Opus 5.5" drew attention from the developer community. Three key pieces of information stand out from the title: 500 independently running clocks, a single-file size of 6.3MB, and generation by a model or tool called Opus 5.5. What lies behind this is the intersection of frontend performance, generative code capability, and the single-file deployment philosophy.
Based on the discussion direction of the original Hacker News post, projects like this are typically used to test two questions: first, the performance limits of browsers when rendering a large number of dynamic elements simultaneously; second, the upper bound of a large model's ability to generate a complete, runnable page in one shot. 500 clocks are not simply copy-pasted—if each clock is required to keep independent time, have distinct styles, or carry animations, the browser's rendering pipeline, memory usage, and event loop will all come under pressure.
Engineering Trade-offs of a 6.3MB Single File
Packing all 500 clocks into a single HTML file follows a core idea: trade size for deployment convenience. 6.3MB is not small for a webpage, but compared with the request overhead of loading 500 separate resource files, a single file actually has advantages in distribution and offline use.
The technical prerequisites for this approach typically include: clock logic implemented in inline JavaScript, styles inlined or driven by CSS variables, and no external dependencies. The real difficulty is that if the 500 clocks are generated by looping over the same piece of code, then the independent state management of each clock needs careful design—otherwise it is easy to end up with all clocks ticking in sync, failing to demonstrate the "500" individual identities.
6.3MB averages out to about 12.6KB per clock. That number is not generous for a component that includes animations and styles, which suggests the implementation was likely streamlined: removing redundant comments, minifying code, reusing DOM structures, and possibly even using Canvas or CSS animations instead of frame-by-frame JavaScript updates.
Canvas Rendering vs. DOM Rendering
When the number of similar dynamic elements reaches hundreds, modeling each one with DOM brings considerable node count and style computation costs. The Canvas approach draws 500 clocks onto a single canvas, with only one DOM node existing; a piece of JavaScript uniformly draws all the clock faces and hands each frame, and node management overhead is nearly zero. The cost is losing DOM accessibility, text selection, and CSS styling capabilities, and event hit detection must be implemented manually. For dense, display-only visualizations, Canvas is often more stable than DOM; if the clocks need independent interaction or distinct styles, DOM plus compositing layers remains the more direct choice.
Performance Limits of Browser Rendering for Many Clocks
500 simultaneously running clocks are essentially 500 independent high-frequency timed update sources. If setInterval is used to drive each clock separately, the burden on the event loop will be considerable; a more reasonable approach is to use a single unified requestAnimationFrame loop to drive all clocks, updating them in batches based on time differences.
Whether the browser can render smoothly depends on several factors: total DOM node count, whether reflow is triggered, and whether animations go through compositing layers. Pure text updates (such as changes in seconds) trigger repaint but not necessarily reflow; if each clock has complex hand rotation animations, CSS transform and will-change are needed to promote them to GPU compositing layers, otherwise the main thread can easily be overwhelmed.
From typical feedback in the Hacker News comment section, the performance of such demos is highly device-dependent. Desktop browsers usually hold up, while mobile devices may experience dropped frames or overheating. This also explains why the single-file approach should be as lean as possible: every bit of per-clock overhead saved, multiplied by 500, becomes a considerable overall gain.
The Difference Between requestAnimationFrame (rAF) and setInterval
setInterval has the timer thread push callbacks into the task queue at fixed intervals; the intervals are not precise, and each timer queues independently. 500 timers mean 500 independent wake-up sources, and when callbacks pile up, the event loop gets crowded out. requestAnimationFrame aligns callbacks to the browser's display refresh rhythm (typically 60Hz, i.e., about once every 16.7ms), executing only once per frame and naturally synchronizing with the rendering pipeline. Using a single rAF loop to iterate over all clocks and calculate angles or seconds based on the time difference between performance.now() and the previous frame ensures visual smoothness while reducing scheduling overhead from O(500) to O(1). In addition, rAF automatically pauses when the tab is not visible, reducing unnecessary power consumption in the background.
Reflow, Repaint, and Compositing Layers
Browser rendering is roughly divided into three stages: layout (reflow), paint (repaint), and composite. Modifying geometric properties such as width, top, and margin triggers reflow, which is the most expensive; modifying color, background, etc., only triggers repaint; and when modifying transform and opacity, if the element has been promoted to an independent compositing layer, the browser can perform layer transformation only on the GPU, skipping layout and paint. will-change: transform or transform: translateZ(0) are common layer promotion techniques, but too many layers consume video memory and increase compositing overhead. Promoting all 500 elements is unrealistic; usually only elements with hand rotations need to be promoted on demand.
The "One-Shot Complete Delivery" Experiment of Generative Code
The "by Opus 5.5" in the title points to model generation capability. Having a model produce a complete HTML file containing 500 clocks that can be opened directly in a browser in one shot tests the coherence and self-consistency of long code generation—no unclosed tags, no references to nonexistent resources, and logic that must run correctly.
The value of such experiments is not in the clocks themselves, but in verifying whether the model can maintain structure and consistency in a larger body of code. The 6.3MB output indicates that the generated content is substantial in scale, and the model needs to maintain syntactic correctness and functional completeness at that scale, which is far more difficult than generating a few dozen lines of example code.
Referring to community discussions of similar single-file generation projects, common doubts focus on two points: first, whether the generated code is maintainable and readable; second, whether performance optimization is adequate. Single-file delivery works in demo scenarios, but for production use, splitting and engineering are still needed.
Long-Context Generation and Self-Consistency
When a large model generates code, it outputs token by token with a limited context window. The longer the generation, the more prone it is to inconsistencies: variable name drift, duplicate function definitions, unclosed tags, references to resources it never defined. Having a model produce several MB of complete HTML in one shot is essentially testing whether it can maintain global structural memory across an ultra-long output—including the correspondence between CSS class names and HTML structure, and the closure of function calls in scripts. The evaluation focus of such experiments is therefore not how beautiful the code is, but whether the output can run with zero modifications. In actual engineering, segmented generation plus splicing validation is usually adopted, or syntax and runtime checks are performed by humans and automated tools after generation.
Applicable Scenarios and Limitations of Single-File Applications
The single-HTML-file approach has clear advantages in specific scenarios: offline tools, teaching demos, quick sharing, and embedded small applications. Users can run it with a double-click, with no build step or server required.
The limitations are equally clear. Once the size exceeds several MB, first-screen loading and parsing time increase; all logic is coupled in one file, making collaboration and version management difficult; browser cache granularity is coarse, and any small change requires re-downloading the entire file. 500 clocks are appropriate as a demo, but as a product form, caution is warranted.
This project is more like a stress test: testing the browser's rendering limits, and also testing the model's ability to generate long code. The signal it sends is that single-file delivery is already feasible for demo-level applications, but there is still a gap before engineering implementation.
Takeaways for Developers
If you are also considering a similar approach, several lessons are worth referencing: use a unified animation loop instead of a large number of independent timers; restrict animation properties to transform and opacity to go through compositing layers; control single-file size and split on demand when necessary; and after generative code is produced, manual review of performance and maintainability is still required.
The 500-clock demo is ultimately an interesting experiment, but the single-file deployment thinking and the boundaries of generative code it reflects have practical reference value for frontend engineering.
Related articles

macOS Is No Longer UNIX: Apple Didn't Renew Certification, But the Technology Is Unchanged
Apple did not renew macOS's UNIX certification, and the Open Group has removed Apple's entry. This article analyzes the technical reality behind the expiration, Apple's possible intentions, and the practical impact on developers.

Building Stateful Multi-Agent Systems with Azure Cosmos DB
Based on the official Azure Cosmos DB tutorial, this article explains how to use the Agent Memory Toolkit to add shared persistent memory to a multi-agent travel planner, covering short-term, long-term, episodic, and semantic memory plus cross-session state continuity.

Production AI Agent Operations: A Three-Step Framework for Observing, Evaluating, and Optimizing
Azure Cosmos DB team proposes a three-step framework for production AI Agent operations: observe trace tracking, evaluate with LLM as a judge and regression testing, optimize cost across RU, retrieval, memory, and LLM layers.