Commit 48ffc5e
committed
perf: lazy-load lyrics only when lyrics view is visible
- Remove eager lyrics prefetch on every track change to avoid unnecessary network calls
- Add ensureLyricsLoaded() method with lifecycle-aware guard (skip when app is paused/hidden)
- Trigger lyrics fetch from full-screen player only when visible and app is resumed
- Deduplicate prefetch calls using track key to prevent redundant requests1 parent 4601c40 commit 48ffc5e
File tree
2 files changed
+56
-6
lines changed- lib
- providers
- widgets
2 files changed
+56
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1209 | 1209 | | |
1210 | 1210 | | |
1211 | 1211 | | |
1212 | | - | |
1213 | | - | |
1214 | 1212 | | |
1215 | 1213 | | |
1216 | 1214 | | |
| |||
1462 | 1460 | | |
1463 | 1461 | | |
1464 | 1462 | | |
1465 | | - | |
1466 | | - | |
1467 | 1463 | | |
1468 | 1464 | | |
1469 | 1465 | | |
| |||
1761 | 1757 | | |
1762 | 1758 | | |
1763 | 1759 | | |
1764 | | - | |
1765 | | - | |
1766 | 1760 | | |
1767 | 1761 | | |
1768 | 1762 | | |
| |||
1990 | 1984 | | |
1991 | 1985 | | |
1992 | 1986 | | |
| 1987 | + | |
| 1988 | + | |
| 1989 | + | |
| 1990 | + | |
| 1991 | + | |
1993 | 1992 | | |
1994 | 1993 | | |
| 1994 | + | |
| 1995 | + | |
| 1996 | + | |
| 1997 | + | |
| 1998 | + | |
| 1999 | + | |
| 2000 | + | |
| 2001 | + | |
| 2002 | + | |
| 2003 | + | |
1995 | 2004 | | |
1996 | 2005 | | |
1997 | 2006 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
204 | 207 | | |
205 | 208 | | |
206 | 209 | | |
207 | 210 | | |
208 | 211 | | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
209 | 227 | | |
210 | 228 | | |
211 | 229 | | |
212 | 230 | | |
| 231 | + | |
| 232 | + | |
213 | 233 | | |
214 | 234 | | |
215 | 235 | | |
216 | 236 | | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
217 | 256 | | |
218 | 257 | | |
219 | 258 | | |
| |||
246 | 285 | | |
247 | 286 | | |
248 | 287 | | |
| 288 | + | |
249 | 289 | | |
250 | 290 | | |
251 | 291 | | |
252 | 292 | | |
253 | 293 | | |
254 | 294 | | |
| 295 | + | |
255 | 296 | | |
256 | 297 | | |
257 | 298 | | |
| |||
0 commit comments