Skip to content

Commit df30185

Browse files
committed
Do not run a rail nobody is looking at
Both rails started their animation frame on mount and kept it for as long as the tab was open. On the home page both are below the fold, so the first thing they did was animate something nobody could see, on the one thread that was also hydrating the page -- and then carry on doing it for the rest of the visit. They wait to be on screen now, with a little margin so a rail is already moving when it comes into view rather than visibly starting under somebody's eye, and they stop again when it leaves. What it bought, measured on a throttled phone: the home page's LCP went 2176ms to 2040ms. Blocking time did not move -- 486ms to 477ms -- which says plainly that the blocking is React hydrating sixteen hundred nodes rather than anything the rails do. Worth saying rather than claiming the win: the real gain is a phone that stops running two animation loops for sections nobody is looking at. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0128YzbhrfGdegUSc9RrARRf
1 parent 6bb9b3e commit df30185

66 files changed

Lines changed: 179 additions & 154 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.vite/manifest.json‎

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"file": "assets/SectionArt-Dn7_dd8k.js",
1111
"name": "SectionArt"
1212
},
13-
"_ServicePage-_rcmteWC.js": {
14-
"file": "assets/ServicePage-_rcmteWC.js",
13+
"_ServicePage-l35B_rhT.js": {
14+
"file": "assets/ServicePage-l35B_rhT.js",
1515
"name": "ServicePage",
1616
"imports": [
1717
"_SectionArt-Dn7_dd8k.js",
@@ -20,7 +20,7 @@
2020
]
2121
},
2222
"index.html": {
23-
"file": "assets/index-GJy-G04k.js",
23+
"file": "assets/index-D7WrVYp4.js",
2424
"name": "index",
2525
"src": "index.html",
2626
"isEntry": true,
@@ -52,7 +52,7 @@
5252
]
5353
},
5454
"src/pages/About.tsx": {
55-
"file": "assets/About-xuYPq8S7.js",
55+
"file": "assets/About-D2195TwG.js",
5656
"name": "About",
5757
"src": "src/pages/About.tsx",
5858
"isDynamicEntry": true,
@@ -63,17 +63,17 @@
6363
]
6464
},
6565
"src/pages/Bikes.tsx": {
66-
"file": "assets/Bikes-BWEMCe4_.js",
66+
"file": "assets/Bikes-C6QqrH4i.js",
6767
"name": "Bikes",
6868
"src": "src/pages/Bikes.tsx",
6969
"isDynamicEntry": true,
7070
"imports": [
7171
"_SectionArt-Dn7_dd8k.js",
72-
"_ServicePage-_rcmteWC.js"
72+
"_ServicePage-l35B_rhT.js"
7373
]
7474
},
7575
"src/pages/Blog.tsx": {
76-
"file": "assets/Blog-5jQjY1ul.js",
76+
"file": "assets/Blog-COCQyGOd.js",
7777
"name": "Blog",
7878
"src": "src/pages/Blog.tsx",
7979
"isDynamicEntry": true,
@@ -84,7 +84,7 @@
8484
]
8585
},
8686
"src/pages/CarModel.tsx": {
87-
"file": "assets/CarModel-B3bGK_mW.js",
87+
"file": "assets/CarModel-c3Zp0Ltm.js",
8888
"name": "CarModel",
8989
"src": "src/pages/CarModel.tsx",
9090
"isDynamicEntry": true,
@@ -96,7 +96,7 @@
9696
]
9797
},
9898
"src/pages/CarRentalAreas.tsx": {
99-
"file": "assets/CarRentalAreas-ZFPN0yWV.js",
99+
"file": "assets/CarRentalAreas-CHxXKS4-.js",
100100
"name": "CarRentalAreas",
101101
"src": "src/pages/CarRentalAreas.tsx",
102102
"isDynamicEntry": true,
@@ -107,7 +107,7 @@
107107
]
108108
},
109109
"src/pages/Cars.tsx": {
110-
"file": "assets/Cars-Dl0nHbno.js",
110+
"file": "assets/Cars-BslaSABl.js",
111111
"name": "Cars",
112112
"src": "src/pages/Cars.tsx",
113113
"isDynamicEntry": true,
@@ -118,7 +118,7 @@
118118
]
119119
},
120120
"src/pages/Contact.tsx": {
121-
"file": "assets/Contact-DXF0EtuW.js",
121+
"file": "assets/Contact-YlWXWbsv.js",
122122
"name": "Contact",
123123
"src": "src/pages/Contact.tsx",
124124
"isDynamicEntry": true,
@@ -129,7 +129,7 @@
129129
]
130130
},
131131
"src/pages/Monthly.tsx": {
132-
"file": "assets/Monthly-DX_hS-mr.js",
132+
"file": "assets/Monthly-BGcRoxH3.js",
133133
"name": "Monthly",
134134
"src": "src/pages/Monthly.tsx",
135135
"isDynamicEntry": true,
@@ -150,7 +150,7 @@
150150
]
151151
},
152152
"src/pages/Nri.tsx": {
153-
"file": "assets/Nri-BfhHAqhR.js",
153+
"file": "assets/Nri-B5D1FR-Q.js",
154154
"name": "Nri",
155155
"src": "src/pages/Nri.tsx",
156156
"isDynamicEntry": true,
@@ -161,7 +161,7 @@
161161
]
162162
},
163163
"src/pages/Places.tsx": {
164-
"file": "assets/Places-sS4AenHE.js",
164+
"file": "assets/Places-B67K-6Xi.js",
165165
"name": "Places",
166166
"src": "src/pages/Places.tsx",
167167
"isDynamicEntry": true,
@@ -172,7 +172,7 @@
172172
]
173173
},
174174
"src/pages/Post.tsx": {
175-
"file": "assets/Post-CMjZ2H1s.js",
175+
"file": "assets/Post-DpAXC6SE.js",
176176
"name": "Post",
177177
"src": "src/pages/Post.tsx",
178178
"isDynamicEntry": true,
@@ -184,7 +184,7 @@
184184
]
185185
},
186186
"src/pages/ServiceArea.tsx": {
187-
"file": "assets/ServiceArea-PiKm_NNZ.js",
187+
"file": "assets/ServiceArea-yqp8ioKz.js",
188188
"name": "ServiceArea",
189189
"src": "src/pages/ServiceArea.tsx",
190190
"isDynamicEntry": true,
@@ -196,7 +196,7 @@
196196
]
197197
},
198198
"src/pages/Services.tsx": {
199-
"file": "assets/Services-BMj0vq0q.js",
199+
"file": "assets/Services-D7VD2Kar.js",
200200
"name": "Services",
201201
"src": "src/pages/Services.tsx",
202202
"isDynamicEntry": true,
@@ -207,7 +207,7 @@
207207
]
208208
},
209209
"src/pages/Tariff.tsx": {
210-
"file": "assets/Tariff-DkCn5Br_.js",
210+
"file": "assets/Tariff-5WzJukE7.js",
211211
"name": "Tariff",
212212
"src": "src/pages/Tariff.tsx",
213213
"isDynamicEntry": true,
@@ -218,17 +218,17 @@
218218
]
219219
},
220220
"src/pages/TouristVehicles.tsx": {
221-
"file": "assets/TouristVehicles-CXaOGH8m.js",
221+
"file": "assets/TouristVehicles-mCGBXqPp.js",
222222
"name": "TouristVehicles",
223223
"src": "src/pages/TouristVehicles.tsx",
224224
"isDynamicEntry": true,
225225
"imports": [
226226
"_SectionArt-Dn7_dd8k.js",
227-
"_ServicePage-_rcmteWC.js"
227+
"_ServicePage-l35B_rhT.js"
228228
]
229229
},
230230
"src/pages/Town.tsx": {
231-
"file": "assets/Town-MAZKDwQF.js",
231+
"file": "assets/Town-BT-4zvDd.js",
232232
"name": "Town",
233233
"src": "src/pages/Town.tsx",
234234
"isDynamicEntry": true,
@@ -240,13 +240,13 @@
240240
]
241241
},
242242
"src/pages/WeddingCars.tsx": {
243-
"file": "assets/WeddingCars-BsSfXgt0.js",
243+
"file": "assets/WeddingCars-ABqAglE7.js",
244244
"name": "WeddingCars",
245245
"src": "src/pages/WeddingCars.tsx",
246246
"isDynamicEntry": true,
247247
"imports": [
248248
"_SectionArt-Dn7_dd8k.js",
249-
"_ServicePage-_rcmteWC.js"
249+
"_ServicePage-l35B_rhT.js"
250250
]
251251
}
252252
}

‎404.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
the page is visible by default and hidden only where something can
9292
unhide it. -->
9393
<script>document.documentElement.dataset.js = '';</script>
94-
<script type="module" crossorigin src="/assets/index-GJy-G04k.js"></script>
94+
<script type="module" crossorigin src="/assets/index-D7WrVYp4.js"></script>
9595
<link rel="modulepreload" crossorigin href="/assets/SectionArt-Dn7_dd8k.js">
9696
<link rel="stylesheet" crossorigin href="/assets/index-DNfT0yaF.css">
9797

‎about/index.html‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,11 @@
9191
the page is visible by default and hidden only where something can
9292
unhide it. -->
9393
<script>document.documentElement.dataset.js = '';</script>
94-
<script type="module" crossorigin src="/assets/index-GJy-G04k.js"></script>
94+
<script type="module" crossorigin src="/assets/index-D7WrVYp4.js"></script>
9595
<link rel="modulepreload" crossorigin href="/assets/SectionArt-Dn7_dd8k.js">
9696
<link rel="stylesheet" crossorigin href="/assets/index-DNfT0yaF.css">
9797

98-
<link rel="modulepreload" href="/assets/About-xuYPq8S7.js" />
98+
<link rel="modulepreload" href="/assets/About-D2195TwG.js" />
9999
<script type="application/ld+json">{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://niteshacars.in/"},{"@type":"ListItem","position":2,"name":"About Us","item":"https://niteshacars.in/about"}]}</script>
100100
</head>
101101
<body>

0 commit comments

Comments
 (0)