https://github.com/starptech/shapeleak
Find subsequent changes in Objects which can result in unoptimized code
https://github.com/starptech/shapeleak
debugging-tool nodejs performance v8
Last synced: 11 months ago
JSON representation
Find subsequent changes in Objects which can result in unoptimized code
- Host: GitHub
- URL: https://github.com/starptech/shapeleak
- Owner: StarpTech
- License: mit
- Created: 2018-01-06T21:07:23.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-14T09:31:55.000Z (almost 8 years ago)
- Last Synced: 2024-10-07T03:17:38.656Z (over 1 year ago)
- Topics: debugging-tool, nodejs, performance, v8
- Language: JavaScript
- Homepage:
- Size: 19.5 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# shapeleak
Find subsequent changes in Objects which can result in unoptimized code. If you don't know what we talking about I can recommend [this](https://blog.ghaiklor.com/optimizations-tricks-in-v8-d284b6c8b183) article.
Requires Node 6.4+
## Features
* Print exact location of the violation.
* Can be applied to Factory, Object-Literal and objects instantiated by `new`.
* Does not break existing code.
## Output
```
E:\Repositorys\shaped\example.js
20:8 type update - Property 'name' has changed it's type from 'string' to 'number'
21:7 create - Property 'foo' was added to shape (name)
22:1 delete - Property 'name' was deleted from shape (name,foo)
37:8 type update - Property 'name' has changed it's type from 'string' to 'number'
38:7 create - Property 'foo' was added to shape (name)
39:1 delete - Property 'name' was deleted from shape (name,foo)
50:8 type update - Property 'name' has changed it's type from 'string' to 'number'
51:7 create - Property 'foo' was added to shape (name)
52:1 delete - Property 'name' was deleted from shape (foo)
```