Replies: 2 comments
-
|
the next and previous ids may be able to be dropped indeed. There was a reason for giving The size_variants, this is pretty much automated from the DTO, the underlying library (spatie/Laravel-data) and the relationship implementation. I am not sure there is much I can do here. Possibly adding pagination & infinite scrolling would be a nicer approach (though the coming back from photo view and reloading is going to be tricky). |
Beta Was this translation helpful? Give feedback.
-
|
In my opinion, the router switches to the desired page, triggering the request to load the album information. Normally, you could use a variable to indicate the loading state and show a loading bar. Once the data is available, the loading bar can be hidden. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have created a new album with 340 photos. When I open the album, I see a blank page without any information about the loading process, no menu, just a white page.
api/v2/Album?album_id=N-XXXXXXXXXXXX -> loading time is1.5s(1MB)3sIn the JSON response, I noticed a few points worth optimizing:
next_photo_idandprevious_photo_id: These values can likely be calculated on the client side, reducing server-side overhead.album_id: Could this field be removed entirely if it's redundant?size_variantsin URLs: There’s potential to save space by optimizing how these URLs are structured, as they remain largely identical.Beta Was this translation helpful? Give feedback.
All reactions