Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6761583
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:12:37+00:00 2026-05-26T14:12:37+00:00

Relevant background info I’ve built a little software that can be customized via a

  • 0

Relevant background info

I’ve built a little software that can be customized via a config file. The config file is parsed and translated into a nested environment structure (e.g. .HIVE$db = an environment, .HIVE$db$user = “Horst”, .HIVE$db$pw = “my password”, .HIVE$regex$date = some regex for dates etc.)

I’ve built routines that can handle those nested environments (e.g. look up value “db/user” or “regex/date”, change it etc.). The thing is that the initial parsing of the config files takes a long time and results in quite a big of an object (actually three to four, between 4 and 16 MB). So I thought “No problem, let’s just cache them by saving the object(s) to .Rdata files”. This works, but “loading” cached objects makes my Rterm process go through the roof with respect to RAM consumption (over 1 GB!!) and I still don’t really understand why (this doesn’t happen when I “compute” the object all anew, but that’s exactly what I’m trying to avoid since it takes too long).

I already thought about maybe serializing it, but I haven’t tested it as I would need to refactor my code a bit. Plus I’m not sure if it would affect the “loading back into R” part in just the same way as loading .Rdata files.

Question

Can anyone tell me why loading a previously computed object has such effects on memory consumption of my Rterm process (compared to computing it in every new process I start) and how best to avoid this?

If desired, I will also try to come up with an example, but it’s a bit tricky to reproduce my exact scenario. Yet I’ll try.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T14:12:37+00:00Added an answer on May 26, 2026 at 2:12 pm

    Its likely because the environments you are creating are carrying around their ancestors. If you don’t need the ancestor information then set the parents of such environments to emptyenv() (or just don’t use environments if you don’t need them).

    Also note that formulas (and, of course, functions) have environments so watch out for those too.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Quick background info: of the three database tables that are relevant for this question,
Here are the relevant models: User Product Order A User can sell or buy
How can I pull relevant packet information from a JpCap packet? I am trying
I have a stylesheet that looks like this: body{ background: #333; } ... @media
Little background, the table view is filled by a fetchedResultsController which fills the table
Background: Many years ago, I inherited a codebase that was using the Visual Studio
Background: I'm building a poetry site with user submitted content. The relevant user actions
A little background: I'm creating a set of adapters to allow communication with mobile
The Problem: Background Information I'm writing an application for a client that is to
Background I'm developing a research application that runs on Android phones. In short, the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.