Evaluate an option to fetch limited or all event fields for range requests
I maintainer di solito rispondono entro 7 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- javascript, php
- Ambito
- api, backend, performance
Direzione di ricerca
Inizia esaminando l’endpoint events.php e confrontando i campi utilizzati dalle viste elenco e dettaglio. Esamina l’issue #576 e determina quali campi principali utilizza l’app Bike Fun per le viste elenco e mappa, incluse qualsiasi richiesta successiva. Il lavoro è completato quando sono documentati la strategia di risposta, i parametri della richiesta, il piano di compatibilità e il comportamento per i record completi.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Currently, whether you fetch a single event or a range of events from the events endpoint, we send back an events array which contains 1 event object for every matching event. Each event object always includes all of the (public) fields for an event.
For single events, this is obviously desired. For range requests, the client may not need the full object for every single event. For example, the grid view only uses a few properties: id, title, date, time, cancelled, featured, and maybe a few others. We request all of the data for every event that it displays, but to actually see it you have to navigate to an individual ride page (at which point we make a second request and re-fetch the full record anyway).
I did some brief experimenting with past ride data. comparing the current results vs. omitting a handful of fields that aren't likely needed until someone wants to read an individual ride listing:
- description
- contact fields: email, phone, contact
- all of the "print" and "hide" fields (which should be deprecated anyway in this endpoint; see #576)
In my test, this reduced the (uncompressed, but minified) JSON by about 50%, from 512 KB down to 205 KB.
If we want to pursue this further, some considerations:
- The description and print description fields alone may be responsible for a lot of the weight difference
- We'll gain some improvements just by deprecating the "print" and "hide" fields for all requests to the
eventsendpoint - How would these requests by made — optional URL param? e.g.
events.php?startdate=2024-04-04&enddate=2024-04-04&fields=all - A sensible default might be to serve the limited response for range requests, unless the client explicitly requests the full records. This wouldn't be backwards-compatible, however. As a transition, we could make it opt-in for now (
fields=limited?), but flip the default behavior in the next major API version. - Should consider including an additional field in the truncated response, with a URL for the full record
(e.g."full_record":"https://localhost:4443/api/events.php?id=12345"; this is different from theshareableURL, which is a link to the web page rather than the API request) - Fetching a single event could always return all fields, ignoring the param.
- Our list view currently makes use of the fact that it has the full event record for every fetched event. If you expand a ride listing in-place, it does so without needing to load a new page or make another request. We should determine which is speedier overall — requesting all event data up front and expanding in-place, or making a just-in-time request to fetch details if/when needed. (This might be different for busy times of year vs less busy ones, e.g. Pedalpalooza vs January.)
- Find out which core fields Bike Fun app is using for its list and map views and which are needed only for detail views, and if/how they are making follow-up requests.
- Lingua principale
- JavaScript
- Stelle
- 30
- Fork
- 26
- Merge medio
- 6g 23h
- PR unite (30g)
- 3
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di shift-org/shift-docs
-
Unknown --db values report a TypeError instead of the intended errorForse già presa @gangster l’ha presa 70 giorni fa. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
shift-org/shift-docs#1091 ·
I maintainer di solito rispondono entro 7 giorni
-
validateRideLength accepts any Object.prototype key as a ride lengthForse già presa @gangster l’ha presa 70 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
shift-org/shift-docs#1089 ·
I maintainer di solito rispondono entro 7 giorni
-
Favorites page fetches every favorite because getDaily's guard is invertedForse già presa @gangster l’ha presa 70 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
shift-org/shift-docs#1087 ·
I maintainer di solito rispondono entro 7 giorni
-
Add an endpoint for Biiikes to check whether an email address organizes an eventForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
shift-org/shift-docs#1106 · 1 commento ·
I maintainer di solito rispondono entro 7 giorni
-
sitemap.xml emits relative <loc> values, so search engines reject itForse già presa @dduugg l’ha presa 96 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 68/100
shift-org/shift-docs#1082 ·
I maintainer di solito rispondono entro 7 giorni
Tutte le issue di shift-org/shift-docs
Issue simili
-
[BUG]: Prompt compressor crashes with TypeError when a past chat has a non-string response.textForse già presa @ManojDevarajulu l’ha presa oggi. Apertapossible bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
Mintplex-Labs/anything-llm#6737 ·
I maintainer di solito rispondono entro 1 giorno
-
Add: Tooncast brazil feedApertacheck:passed feeds:add
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 62/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
codex-team/editor.js#3037 ·
-
No Code Attached Yet
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
joomla/joomla-cms#48626 ·
I maintainer di solito rispondono entro 1 giorno
-
complexity: trivial good first issue impact: low
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
ueberdosis/tiptap#8522 ·
I maintainer di solito rispondono entro 1 giorno