save_plot_pdf takes too much time

Aperta
#101 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
r
Ambito
performance

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
R
Stelle
1
Fork
3
Merge medio
9h 41m
PR unite (30g)
2

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di SticsRPacks/CroPlotR

Tutte le issue di SticsRPacks/CroPlotR

Issue simili

Altre issue su R

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.