save_plot_pdf takes too much time

Abierto
#101 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Refactorización
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
r
Área
performance

Línea de trabajo

Start by locating save_plot_pdf and profiling its work when given dynamic plots; the issue does not identify a source file or test. Compare runtime on the reported 60-situation example before and after any change, and verify the generated PDFs still work; done means a meaningful reduction in runtime that makes larger SMS datasets more feasible.

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

Descripción

performance

save_plot_pdf takes too much time — about 8 minutes to generate a PDF of dynamic plots for 60 situations.

I want to generate files using CroPlotR to obtain evaluation results from STICS.
To achieve this, I do the following:

sim <- SticsRFiles::get_sim(workspace = "path/to/usms_data")
obs <- SticsRFiles::get_obs(workspace = "path/to/usms_data")

library(CroPlotR)

plots <- plot(sim, obs = obs, type = "dynamic")
CroPlotR::save_plot_pdf(plots, out_dir = "/path/to/out_dir")

The 60 situations are a sample from SMS data.

I used the RStudio profiler to get more information about which parts of the code are the most time-consuming.

Image

This behavior occurs on both the main and code-refactoring branches.

I think the function should be optimized to reduce execution time.
My goal is to have an evaluation system that processes at least the entire SMS dataset (around 3,200 situations), but at the moment this is not feasible due to the long processing time.

Lenguaje dominante
R
Estrellas
1
Forks
3
Merge medio
9 h 41 min
PR fusionados (30 d)
2

Preparar el entorno

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 SticsRPacks/CroPlotR

Todos los issues de SticsRPacks/CroPlotR

Issues similares

Más issues de R

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.