Evaluate an option to fetch limited or all event fields for range requests
Los mantenedores suelen responder en 7 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- javascript, php
- Área
- api, backend, performance
Línea de trabajo
Comienza examinando el endpoint events.php y comparando los campos utilizados por las vistas de lista y de detalle. Revisa el issue #576 y determina qué campos principales utiliza la aplicación Bike Fun para las vistas de lista y de mapa, incluidas las solicitudes de seguimiento. Se considera completado cuando estén documentados la estrategia de respuesta, los parámetros de la solicitud, el plan de compatibilidad y el comportamiento para registros completos.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- JavaScript
- Estrellas
- 30
- Forks
- 26
- Merge medio
- 6 d 23 h
- PR fusionados (30 d)
- 3
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de shift-org/shift-docs
-
Unknown --db values report a TypeError instead of the intended errorPosiblemente ocupada @gangster la tomó hace 66 días. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
shift-org/shift-docs#1091 ·
Los mantenedores suelen responder en 7 días
-
validateRideLength accepts any Object.prototype key as a ride lengthPosiblemente ocupada @gangster la tomó hace 66 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
shift-org/shift-docs#1089 ·
Los mantenedores suelen responder en 7 días
-
Favorites page fetches every favorite because getDaily's guard is invertedPosiblemente ocupada @gangster la tomó hace 66 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
shift-org/shift-docs#1087 ·
Los mantenedores suelen responder en 7 días
-
sitemap.xml emits relative <loc> values, so search engines reject itPosiblemente ocupada @dduugg la tomó hace 92 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 68/100
shift-org/shift-docs#1082 ·
Los mantenedores suelen responder en 7 días
-
Dificultad 3/5 1-2 días Aptitud para principiantes 58/100
shift-org/shift-docs#1072 ·
Los mantenedores suelen responder en 7 días
Todos los issues de shift-org/shift-docs
Issues similares
-
documentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 91/100
githubnext/gh-aw-workshop#4458 ·
Los mantenedores suelen responder en 1 día
-
Add: CartoonitoAbiertocheck:failed feeds:add
Dificultad 2/5 1-3 horas Aptitud para principiantes 63/100
iptv-org/database#37390 · 1 comentario ·
Los mantenedores suelen responder en 9 días
-
bug: directory index route root priority is overwritten when wildcard is falsePosiblemente ocupada @TalhaHunter101 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
fastify/fastify-static#617 ·
-
agent/sec-check hive/hosted-available-lke648397-260827-5n31 security
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Tool errors containing cycles or BigInt crash getErrorMessage and replace the original failureAbiertofactory-active factory-automatic task-bug-reproduction-success task-identify-harness-labels-done task-identify-issue-type-done
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
vercel/ai#22796 · 2 comentarios ·
Los mantenedores suelen responder en 1 día