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 7884873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:55:01+00:00 2026-06-03T04:55:01+00:00

I have a largish web app that uses a Javascript inheritance style that duplicates

  • 0

I have a largish web app that uses a Javascript inheritance style that duplicates the methods of every object for every instance.

Can anybody tell me how I can estimate how much memory is being consumed to store a duplicate of each function for each instance?

I’ve seen posts that help estimate the variable usage, but what about the instructions, the code itself?

For example:

function createAnimal() {
    var self = {};
    self.think = function () {
        consol.log("thinking");
    };
    return self;
}

function createDog () {
    var self = createAnimal();
    self.bark = function () {
        console.log("woof woof");
    };
    return self;
}


var spot = createDog();
var ralph = createDog();
  • 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-06-03T04:55:02+00:00Added an answer on June 3, 2026 at 4:55 am

    In firefox go to about:memory. Under js it lists the memory usage:

    ├──19.78 MB (34.58%) -- js
    │  ├───9.87 MB (17.25%) -- compartment([System Principal], 0x336e000)
    │  │   ├──4.72 MB (08.25%) -- gc-heap
    │  │   │  ├──2.33 MB (04.07%) -- objects
    │  │   │  ├──1.48 MB (02.58%) -- shapes
    │  │   │  ├──0.59 MB (01.03%) -- scripts
    │  │   │  └──0.33 MB (00.57%) -- (6 omitted)
    │  │   ├──1.18 MB (02.06%) -- script-data
    │  │   ├──1.00 MB (01.75%) -- mjit-code
    │  │   │  ├──0.92 MB (01.60%) -- method
    │  │   │  └──0.08 MB (00.15%) -- (2 omitted)
    │  │   ├──0.68 MB (01.19%) -- analysis-temporary
    │  │   ├──0.60 MB (01.04%) -- (5 omitted)
    │  │   ├──0.48 MB (00.84%) -- object-slots
    │  │   ├──0.46 MB (00.81%) -- mjit-data
    │  │   ├──0.41 MB (00.72%) -- property-tables
    │  │   └──0.34 MB (00.59%) -- string-chars
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web app written in ASP.NET MVC 3.0. There are some largish
I have some existing (largish) ASP.NET web applications that people are starting to visit
Have an app that can use tts to read text messages. It can also
I have a largish application that runs fine and uses session variables widely We
I have a largish complex app around 27k lines. Its essentially a rule drive
I have a largish array of string that I want to use as a
I'm debugging an apparent concurrency issue in a largish app that I hack on
I have an asp.net website that allows the user to download largish files -
I'm working on an google app engine app that will have to deal with
I have a largish Mercurial repository that I've decided would be better as several

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.