Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve compiler memory efficiency #149

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion R/z_animint.R
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ storeLayer <- function(meta, g, g.data.varied){
animint2dir <- function(plot.list, out.dir = NULL,
json.file = "plot.json", open.browser = interactive(),
css.file = "") {
print("start of animint2dir")
if(is.null(out.dir)){
out.dir <- tempfile()
}
Expand Down Expand Up @@ -352,6 +353,7 @@ animint2dir <- function(plot.list, out.dir = NULL,
}

## Call ggplot_build in parsPlot for all ggplots
print("before parse")
ggplot.list <- list()
AllPlotsInfo <- list()
for(list.name in names(plot.list)){
Expand All @@ -367,6 +369,7 @@ animint2dir <- function(plot.list, out.dir = NULL,

## After going through all of the meta-data in all of the ggplots,
## now we have enough info to save the TSV file database.
print("before export")
geom_num <- 0
g.list <- list()
for(p.name in names(ggplot.list)){
Expand Down Expand Up @@ -406,8 +409,9 @@ animint2dir <- function(plot.list, out.dir = NULL,
g.list[[p.name]][[gl$g$classed]] <- gl
}#layer.i
}
print("after export")

## Selector levels and update were stored in saveLayer, so now
## Selector levels and update were stored in export_animint, so now
## compute the unique values to store in meta$selectors.
for(selector.name in names(meta$selector.values)){
values.update <- meta$selector.values[[selector.name]]
Expand Down
4 changes: 2 additions & 2 deletions R/z_animintHelpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -580,8 +580,8 @@ issueSelectorWarnings <- function(geoms, selector.aes, duration){
return(NULL)
}

#' Gives a unique name to each layer in \code{saveLayer}
#' @param L layer in saveLayer to be named
#' Gives a unique name to each layer in \code{export_animint}
#' @param L layer in export_animint to be named
#' @param geom_num the number of the layer to be saved
#' @param p.name the name of the plot to which the layer belongs
#' @return a unique name for the layer
Expand Down
Loading