Skip to content

Instantly share code, notes, and snippets.

View mlorant's full-sized avatar

Maxime Lorant mlorant

  • Orfeo
  • Bretagne, France
View GitHub Profile
@hay
hay / gist:1351230
Last active March 29, 2024 16:36
Enterprisify your Java Class Names!
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Enterprisify your Java Class Names! (by Hay Kranen)</title>
<style>
body {
background: white;
text-align: center;
@goopi
goopi / django-profiling.sh
Created October 3, 2014 00:13
Profiling Django using runprofileserver and QCacheGrind
$ # install QCacheGrind (KCacheGrind)
$ brew install qcachegrind
$ brew install graphviz
$ brew linkapps
$ pip install django-extensions
$ # run profiling server
$ ./manage.py runprofileserver 0:3000 --kcachegrind --prof-path=path/to/profiles
@paulirish
paulirish / what-forces-layout.md
Last active July 25, 2024 07:49
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent