Snippets Collections
import cProfile

# Use `profile` if `cProfile` isn't available on your OS
# import profile


def adder(x, y):
	return x + y


cProfile.run('adder(10, 20)')
import timeit


def adder(x, y):
	return x + y


t = timeit.Timer(setup='from __main__ import adder', stmt='adder(10, 20)')
t.timeit()
# A memory leak can occur in your application when an element is no longer attached to the Document Object Model (DOM) tree, but is still referenced by some JavaScript running on the page. These elements are called detached elements.
[https://docs.microsoft.com/en-us/microsoft-edge/devtools-guide-chromium/memory-problems/dom-leaks]
 
 
 a reference to an object will prevent the object referenced from being garbage collected.
 [https://developer.chrome.com/docs/devtools/memory-problems/memory-101/]
 
 
 # window leaks
 variables set on the window do not get collected
 - windwo.myvar = 'whatever'
 [https://medium.com/coding-blocks/catching-memory-leaks-with-chrome-devtools-57b03acb6bb9]
star

Thu Jan 25 2024 04:09:57 GMT+0000 (Coordinated Universal Time)

#performance #python
star

Thu Jan 25 2024 04:06:09 GMT+0000 (Coordinated Universal Time)

#performance #python
star

Sun Jul 24 2022 11:49:03 GMT+0000 (Coordinated Universal Time)

#memory #performance #profile #garbage-collection
star

Sat Feb 19 2022 13:02:25 GMT+0000 (Coordinated Universal Time) https://blog.bitsrc.io/improve-react-performance-using-lazy-loading-and-suspense-933903171954

#react #testing #performance
star

Fri Oct 22 2021 20:58:23 GMT+0000 (Coordinated Universal Time) https://es.wordpress.org/plugins/bf-wpo-dequeuer/

#enqueue #scripts #performance
star

Thu Jul 29 2021 16:13:09 GMT+0000 (Coordinated Universal Time) https://nnethercote.github.io/perf-book/title-page.html

#rust #performance

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension