Skip to content

save_plot_pdf takes too much time #101

Description

@vrahier

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    performanceEnhances runtime performance or memory efficiency without changing functionality

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions