Speed up the dashboard

Abierto
#38 3 comentarios 0 reacciones 0 asignados Ver en GitHub

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
Refactorización
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
python

Línea de trabajo

Empieza perfilando el dashboard con los conjuntos de datos CSV de 1,6 MB y 3,3 MB, centrándote en el procesamiento inicial y en las selecciones del mapa color-by. Lee la documentación de rendimiento de Dash y compara las opciones mencionadas de caching, Patch Class, orjson y clientside callback. Se considera terminado cuando se haya identificado el cuello de botella y se haya demostrado una carga más rápida y actualizaciones más rápidas del mapa sin romper el dashboard.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement

Currently, the dashboard starts to slow down with datasets at about 1.6MB, this becomes more pronounced by 3.3MB (CSV with about 12,000 rows by 15 columns).

The slow down is most pronounced in

  1. Initial processing of the dataset (hence we have a loading indicator).
  2. Selecting different color-by options for the map distribution; the change in the map has a pronounced delay.

Diagnosing the specific source of the slow down (if it's one or more reasons) is still required.

The Dash documentation provides various suggestions under their performance section, and the dash-extensions package also has some options:

  1. Flask caching. Since the processing is only done once, this would only have potential to speed up the graphing components, though initial testing didn't seem to show improvement.
    a. A similar solution is background caching.
    b. Dash-extensions has a package for server-side caching: ServersideOutput Transform. This removes the need for JSON serialization between callbacks and should speed things up, though I'm not sure how effective it was (I tried an implementation on the server-store branch). This would also require a regular clean-up of the cached files (as with the previous two).
  2. Dash Patch Class for updating the map (and potentially other graphs as well). Plotly express is fast, but starts to slow down around 15K points (per dash performance docs). I attempted to implement this with the map, but my initial attempt was unsuccessful.
  3. Using orjson. I'm unclear on precisely how this potential solution works, it seems (and this) that having the package installed allows dash to serialize json strings with orjson instead. There are errors thrown if you try to use it for the serialization (the speedup comes from the fact that it's bytes).
  4. Clientside Callbacks. To implement this, the graphing portion would have to be translated into Javascript.
Lenguaje dominante
Python
Estrellas
6
Forks
2
Métricas de merge de PR
Sin PR fusionados en 30 d

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

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Imageomics/dashboard-prototype

Todos los issues de Imageomics/dashboard-prototype

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.