Skip to content

Instantly share code, notes, and snippets.

perftale temp/after-fixes.json.gz
VERDICT
60fps, 14 dropped frames (1.2%) — worst freeze 166ms at 3.40s
bound animation · 96% of main-thread frame time
hotspot sampleHeight terrain/elevationField.ts:138 · 193ms self
notes
• React: 2441 component renders across 27 components (290ms, React DevTools timing).
Most-rendered: Button ×1247 — frequent re-renders are the usual culprit; check
memoization / state placement. Timings include React DevTools recording overhead —
perftale temp/memory-growth-2.json.gz
VERDICT
60fps, 0 dropped frames — running close to budget
bound animation · 92% of main-thread frame time
hotspot _getGlobalBoundsRecursive assets/pixi-DRolKATm.js:13 · 366ms self
notes
• Memory leak (likely): the JS heap floor rose ~78MB/min (+27MB over 20s) while the
main thread sat idle 84% of the time — memory shouldn't climb when nothing is
happening. Listeners and nodes are flat, so the retained growth is JS objects
// ThemeContext.tsx
/**
* Calculates layout metrics based on screen dimensions and aspect ratio.
* Establishes a grid system with columns and gutters for responsive design.
*/
const wideBreakpoint = 1200;
const narrowBreakpoint = 800;
const tallBreakpoint = 1000;
export function getMetrics(
{
"name": "wilderplace",
"productName": "wilderplace",
"version": "1.1.0",
"description": "A divine garden adventure",
"main": "src/index.js",
"scripts": {
"start": "electron-forge start",
javascript:(function p(){
const s = Math.min(window.innerWidth, window.innerHeight) / 2;
const img = [
"iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAC8VBMVEXk4QBq2QBWpQDkWgCONQA7NQDGXAC7pgBK2gC65ADH3QA64wCS0gDciQBbSwCBNADjQQBkcQBbugCO4wBV5ADY5ACkvQAubgC+RgDJPwAzTACWiQDaywBd5ACF4wDcXwCvpABO4wC80gDOsQBasACf0gB3ogCPYgDjSQCBeQBnwwDk5QCmyQBprQDYtwCx4wBM0AC8jQDTVQBiVgCvkwDZ1ACIuQDjqAB4yABl4wDjxACneQBqSACaYQDkUgBubQB6rgDkzwCWyQDQcQC8VADKaADJUwBZVwCwhQDcwABtzgDkmQBzYQB0UwDjYgCkmwBYxQDI0wDGvABXhQClUgDcVQDXwgCzeQBGRwCxMQDMLgCOewBs4wDk2wBYZwDYPQCaMgBdPAA/0ADR4gBW0wBNNADjOADe3ACg4wA8hwDL5AA8ugB9hADjfwDjyQCKiQBNbADYoQCX2wAw2gC+fwAxkgCt0QAxsADidwBwlwBBeQC8mwDCcQCzUwDRjAAtzgBiiwBUQgAvoQC93AA92gCwvQDKegBvewDkvwBF4wDY2gCXowAxYgBizQCnXwDioACI2gBxjABpVACYVADZSQBJrwBPVACKVACjsgCBlABilwBpuAC7vgCyyQDZewCkaQDjsQCG0ACHpgB60QCTsgBmowBMugDC4wCo4wCaQwCX5ADe5ACn2wBUmwDTlwBX3ABnPADkaQCuagBClwDEyQCafgBWcwCHxwBMyACYcADHhwDjhwDOyQCwsQA9bQCNRwBEpQBg2gB5vACyRAB7bQDZMADk1QB52gB84wClLgBZLgDkkAB1MQDIlQDclQCMbwDTYQBkZABSXwDErgC02QCQmADP2QC8yQ

Did you know that mapbox-gl-native supports high resolution exports? It's true. Follow these steps to enable.

  1. Open the console.
  2. Check out mapbox gl native with git clone git@github.com:mapbox/mapbox-gl-native.git
  3. Run make render which kicks off the build process for a CLI tool for making images. After make render succeeds, the CLI tool will be located at ./build/macos/Debug/mbgl-render.
  4. Type ./build/macos/Debug/mbgl-render in the console. If you press return without any arguments, you'll see help output:
Allowed options:
  -s [ --style ] json                 Map stylesheet

Did you know that mapbox-gl-native supports high resolution exports? It's true. Follow these steps to enable.

  1. Open the console.
  2. Check out mapbox gl native with git clone git@github.com:mapbox/mapbox-gl-native.git
  3. Run make render which kicks off the build process for a CLI tool for making images. After make render succeeds, the CLI tool will be located at ./build/macos/Debug/mbgl-render.
  4. Type ./build/macos/Debug/mbgl-render in the console. If you press return without any arguments, you'll see help output:
Allowed options:
  -s [ --style ] json                 Map stylesheet
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title></title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<style>
body {
font: 16px sans-serif;
margin: 0;
@samanpwbb
samanpwbb / index.html
Last active December 16, 2016 16:57 — forked from tristen/index.html
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title></title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<style>
body {
font: 16px sans-serif;
margin: 0;