schnorr / starvz

R-based visualization techniques for the StarPU runtime

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Optiming memory consumption (more of a reminder than a real issue)

stanisic opened this issue · comments

When working with large traces, especially when running on a personal laptop with very limited memory, optimizing memory consumption can be quite important. Hence, one should be very careful when creating temporal variables and storing intermediate states, because it can easily freeze the machine.

I didnt find any particular issues inside starvz (someone might know better where to look), but when writing additional (external) R visualizations which are using starvz, this is often the case. As these additional codes are typically prototypes and one doesnt care much about optimizing them, the easiest solution is to remove tmp variables manually. For this process, the following R commands can be handy:

ls()  # to list all existing objects
rm(data) # to remove data, although often garbage collector needs to be called later as well
gc() # garbage collector

I leave this Issue open in case someone wants (and knows where) to optimize any starvz function, otherwise feel free to close it and just watch out when writing external R codes...