An open API service indexing awesome lists of open source software.

https://github.com/khbminus/code-size-profiler


https://github.com/khbminus/code-size-profiler

Last synced: 1 day ago
JSON representation

Awesome Lists containing this project

README

          

[![Qodana](https://github.com/khbminus/code-size-profiler/actions/workflows/qodana.yaml/badge.svg)](https://github.com/khbminus/code-size-profiler/actions/workflows/qodana.yaml)

To run this script, you need to generate dumps with the patched compiler (currently branch `dce-info-json-fix`).

How to use:

```shell
$ ./run.sh -e kotlin.test -e -e \
\
\

```

The script also could be used in one-dump mode:

```shell
$ ./run.sh [-e [-e ...]]
```

Use `-e` flag to filter dump for some fqns.

This builds traversable graphs and treemaps (for left and right dumps), treemap of difference,
difference of dominator trees and traversable difference of graphs. Moreover, it generates table of differences.

After it, you can start server with `scripts/server.sh` file.

# Graph Compression

You can use `filter-variable` command from kotlin application (by `./gradlew run --args='filter-variable'`) to compress
DCE graph by removing variables and value parameters from edges. It stores the semantic by changing source vertexes of
edges going from variables.

# Traverse Graph

This page allows seeing the DCE graph structure.
The node is referring to the IR size of the node.
To start:

* check some nodes in the menu on the right (NB: the search bar could
lag, since it filters with common linear string comparison algorithm)
* Select the desirable maximum depth. Be careful, the high depth may freeze the page.

# Zoomable treemap

The treemap allows seeing the size ratio between your code. All elements of IR dump split by FQN. To go deeper, click on
the element. To go back, click on the name above.

The right panel is used for filtering & choosing the size mode.

# Sourcemap

A page inspired by [Godbolt](https://godbolt.org). The page has two sides: on the left there are several kotlin files (
use the selector to choose the right one). The right side has a WAT text of compiled .wasm file. On hover in colored
area the other side will scroll to chosen color.

To compile this page use `generate-source-map script`: