question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Currently we use this pattern to denote that MyThing will have a prop_a property.

class MyThing:
    prop_a = None

It looks like if we instead use __slots__ we could see 40-50% reduction in memory footprint.

class MyThing:
    __slots__ = ["prop_a"]

source:

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
davesquecommented, Apr 4, 2018

@cburgdorf Agreed. Right tool for the right job.

0reactions
pipermerriamcommented, Apr 4, 2018

I think that the objects under the Computation class might be a good candidate for this. For complex EVM execution we could end up with 1000+ instances of each of these objects in memory.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Slots | Vue.js
By using slots, our <FancyButton> is more flexible and reusable. We can now use it in different places with different inner content, but...
Read more >
Using Slots In Vue.js
Slots are a powerful tool for creating reusable components in Vue.js, though they aren't the simplest feature to understand.
Read more >
How to Use Slots in Vue.js
Implementing the use of slots is quite easy, you just have to place the slot inside the child component which is receiving the...
Read more >
Using templates and slots - Web Components | MDN
Slots are identified by their name attribute, and allow you to define placeholders in your template that can be filled with any markup...
Read more >
Using Vue Named Slots to Create Multiple Template Slots
Vue slots allow you to inject content from a parent component into a child component. Here's the most basic example, whatever we put...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found