Commit Graph

32 Commits

Author SHA1 Message Date
Michael Mauderer
8f99014477
Implement multi-process message visualisation. (#3423)
Implements a visualization that is integrated with our GUI profiling visualization for the multiprocess data implemented in #3395

https://user-images.githubusercontent.com/1428930/165915395-c850c7b2-1cc5-4eb0-8f21-37565d113b1e.mp4

The visualization shows a horizontal line for Engine, Language Server and GUI and renders arrows for each message passed between them. Information about the message is revealed on hover.

# Important Notes
* this PR refactors the tooltip mechanism. Note that this has not been in active use anywhere else, as tooltips for node received a custom implementation and the tooltip that was previously implemented was used nowhere else yet.

[ci no changelog needed]
2022-05-03 09:40:27 +00:00
Ilya Bogdanov
bb6a5bac02
Clipping in the Scroll Area (reverting a revert) (#3420)
[ci no changelog needed]

This is fixed copy of already reviewed #3384

[Task link](https://www.pivotaltracker.com/story/show/181413200)

This PR implements content clipping for the ScrollArea component.

List of changes:
- Implemented `InstanceWithAttachedLayer` abstraction that allows creating additional sublayers for our components. In the future, this abstraction can be used for text rendering as well (right now text rendering requires additional hardcoded layers).
- Fixed `complex-shape-system` demo scene by removing `node_searcher_mask` layer.
- Fixed `SublayersModel::remove` - it was not clearing the `layer_placement` hashmap.
- Implemented disabling the wheel scrolling in `Navigator`, and refactored it to reduce the number of functions arguments by introducing a `NavigatorSettings` struct.

Video (`scroll_area` demo):


https://user-images.githubusercontent.com/6566674/164506455-e177a7a7-9f1c-4f50-888f-112423cebbe4.mp4

# Important Notes
- `InstanceWithAttachedLayer` is implemented in such a way that it allows an extension in the future - namely to use it to simplify text rendering. The implementation might be simplified though.
2022-04-27 17:11:49 +00:00
Ilya Bogdanov
88ec8c4774
Revert "Clipping in the ScrollArea (#3384)" (#3419)
This reverts commit 6ba40a7a56.
2022-04-27 15:24:15 +02:00
Ilya Bogdanov
6ba40a7a56
Clipping in the ScrollArea (#3384)
[ci no changelog needed]

[Task link](https://www.pivotaltracker.com/story/show/181413200)

This PR implements content clipping for the ScrollArea component.

List of changes:
- Implemented `InstanceWithAttachedLayer` abstraction that allows creating additional sublayers for our components. In the future, this abstraction can be used for text rendering as well (right now text rendering requires additional hardcoded layers).
- Fixed `complex-shape-system` demo scene by fixing `node_searcher_mask` layer.
- Fixed `SublayersModel::remove` - it was not clearing the `layer_placement` hashmap.
- Implemented disabling the wheel scrolling in `Navigator`, and refactored it to reduce the number of functions arguments by introducing a `NavigatorSettings` struct.

Video (`scroll_area` demo):


https://user-images.githubusercontent.com/6566674/164506455-e177a7a7-9f1c-4f50-888f-112423cebbe4.mp4

# Important Notes
- `InstanceWithAttachedLayer` is implemented in such a way that it allows an extension in the future - namely to use it to simplify text rendering. The implementation might be simplified though.
2022-04-27 11:35:30 +00:00
Kaz Wesley
d59710c3cd
Multi-process profiles. (#3395)
See: [#181837344](https://www.pivotaltracker.com/story/show/181837344).

I've separated this PR from some deeper changes I'm making to the profile format, because the changeset was getting too complex. The new APIs and tools in this PR are fully-implemented, except the profile format is too simplistic--it doesn't currently support headers that are needed to determine the relative timings of events from different processes.

- Adds basic support for profile files containing data collected by multiple processes.
- Implements `api_events_to_profile`, a tool for converting backend message logs (#3392) to the `profiler` format so they can be merged with frontend profiles (currently they can be merged with `cat`, but the next PR will introduce a merge tool).
- Introduces `message_beanpoles`, a simple tool that diagrams timing relationships between frontend and backend messages.

### Important Notes
- All TODOs introduced here will be addressed in the next PR that defines the new format.
- Introduced a new crate, `enso_profiler_enso_data`, to be used by profile consumers that need to refer to Enso application datatypes to interpret metadata.
- Introduced a `ProfileBuilder` abstraction for writing the JSON profile format; partially decouples the runtime event log structures from the format definition.
- Introducing the conversion performed for `ProfilerBuilder` uncovered that the `.._with_same_start!` low-level `profiler` APIs don't currently work; they return `Started<_>` profilers, but that is inconsistent with the stricter data model that I introduced when I implemented `profiler_data`; they need to return profilers in a created, unstarted state. Low-level async profilers have not been a priority, but once #3382 merges we'll have a way to render their data, which will be really useful because async profilers capture *why* we're doing things. I'll bring up scheduling this in the next performance meeting.
2022-04-21 16:44:03 +02:00
Ilya Bogdanov
ea33387836
Update electron-builder to v23.0.6 (#3410)
[ci no changelog needed]

[Task link](https://www.pivotaltracker.com/story/show/181944234).

It fixes the build issue on Mac OS 12.3.1 that is caused by removed `/usr/bin/python` executable.

Also applied `enso-formatter` to the sources.

# Important Notes
We're basically updating for one major `electron-builder` release - from `v22` to `v23`. I didn't spot anything in the changelog that could affect us. See features + breaking changes excerpt:

```
Features:

- feat(msi): add fileAssociation support for MSI target (https://github.com/electron-userland/electron-builder/pull/6530)
- feat(mac): ElectronAsarIntegrity in electron@15 - See: https://github.com/electron/electron/pull/30667 (https://github.com/electron-userland/electron-builder/issues/6506 https://github.com/electron-userland/electron-builder/issues/6507)
- feat(snap): add lzo to Snap compression options (also as new default) (https://github.com/electron-userland/electron-builder/pull/6201) Upgraded app-builder-bin dependency required newer version of Go
- feat(msi): support assisted installer for MSI target (https://github.com/electron-userland/electron-builder/pull/6550)

Breaking changes:

- Removing Bintray support since it was sunset. Ref: https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/
- Fail-fast for windows signature verification failures. Adding -LiteralPath to update file path to disregard injected wildcards
- Force strip path separators for backslashes on Windows during update process
- Authentication for local mac squirrel update server
- Disabled advertised shortcuts, since MSIs with advertised Start Menu shortcuts that have a
Shortcut Property fails to install when deployed machine-wide via GPO but works fine in all
other contexts. Admins using advertisement must apply an MST to re-enable it. See https://github.com/electron-userland/electron-builder/issues/6508.
- Removing optional NSIS icon ID from config and generating it automatically to synchronize IDs with Advertised Shortcuts and future features
```
2022-04-21 11:36:32 +00:00
Michael Mauderer
e8342b04c3
Integrate Ensogl stats with profiling framework (#3388)
Add logging of EnsoGL performance stats to the profiling framework. Also extends the visualization in the debug scene to show an overview of the performance stats. We now render a timeline of blocks that indicate by their colour the rough FPS range we are in:

https://user-images.githubusercontent.com/1428930/162433094-57fbb61a-b502-43bb-8815-b7fc992d3862.mp4

# Important Notes
[ci no changelog needed]

Needs to be merged after https://github.com/enso-org/enso/pull/3382 as it requires some changes about metadata logging from there. That is why this PR is currently still in draft mode and based on that branch.
2022-04-21 09:38:26 +00:00
Michael Mauderer
24e0f33d8e
Backend Communication Profiling (#3382) 2022-04-19 13:30:29 +02:00
Wojciech Daniło
fbe28db1d7
Revert "Revert "Fixed rate animation loop fixes"" (#3399) 2022-04-14 19:58:53 +02:00
Adam Obuchowicz
8ca4e2b003
SDF-based mechanism for making letters bold (#3385)
Fixes [181641027](https://www.pivotaltracker.com/story/show/181641027). There are new methods of text::Area for making some letters bolder, without moving them nor any other letters in the line.

Tested on DejaVuSans text:
![image](https://user-images.githubusercontent.com/3919101/162199723-524f7560-535f-4c98-bcb4-6b760ad8cb04.png)
![image](https://user-images.githubusercontent.com/3919101/162199806-e6582c56-3071-4653-8ad2-114df86cd6b7.png)
![image](https://user-images.githubusercontent.com/3919101/162199880-1836e902-8663-4696-bcb7-2b15c3c243c6.png)

On MacOS:
<img width="824" alt="Screenshot 2022-04-07 at 14 54 40" src="https://user-images.githubusercontent.com/3919101/162203730-ffda3096-7aab-443f-a45a-bfa18784ba36.png">
<img width="379" alt="Screenshot 2022-04-07 at 14 54 52" src="https://user-images.githubusercontent.com/3919101/162203751-f5ca2e26-fdb6-4521-9821-999111b80ac0.png">
<img width="160" alt="Screenshot 2022-04-07 at 14 54 58" src="https://user-images.githubusercontent.com/3919101/162203769-3c367f81-67bb-48aa-994c-42eeb131017e.png">
2022-04-12 17:39:08 +00:00
Wojciech Daniło
6b7622dd45
Multi-frame shader compilation (#3378) 2022-04-12 17:56:38 +02:00
Kaz Wesley
b32fedacd9
Profiling: intervals tool and devtools-file generator (#3359)
* Profiling: intervals tool

* devtools profile generator

* docs

* ignore open intervals, because devtools does

* intervals tool: show interval counts

* Re-add a doc comment. Was accidentally deleted.

* Implement review.

* DURATION_FLOOR_MS

* Rename methods that apply a profile's contents to self

* Description of chrome format

* Link to profile.json format documentation is design doc

* Implement profiling-level switch described in design doc

* lint
2022-04-11 06:08:09 -07:00
Wojciech Daniło
fbd80ad4a3
Allowing EnsoGL mouse to interact with more than 4096 sprites (#3369) 2022-03-30 04:50:55 +02:00
Mateusz Czapliński
7152e0d44d
Revert "Allowing EnsoGL mouse to interact with more than 4096 sprites at the same time. (#3351)" (#3368)
This reverts commit 546c333269.
2022-03-29 11:24:28 +02:00
Wojciech Daniło
546c333269
Allowing EnsoGL mouse to interact with more than 4096 sprites at the same time. (#3351) 2022-03-29 04:15:08 +02:00
Wojciech Daniło
ccaf24877f
Updating paste macro usage (#3334) 2022-03-22 11:43:14 +01:00
Kaz Wesley
a87b2021a3
Profiling application details (#3332)
* Profiling application details

Add enough profiling to account for every missed frame during startup.

See https://www.pivotaltracker.com/story/show/181499507

* Build ActiveInterval hierarchy in profiler_data

* update doctests / await_!

* docs/formatting/naming

* more graph modes

* increase WASM size

Due to new render-profile-flamegraph scene. We should remove these from the main release WASM blob one way or another.

* lint

* fix a test

* Organization (feedback)

* Add @wdanilo to Cargo.lock CODEOWNERS

As discussed after my previous PR got stuck waiting for Cargo.lock review.

* fix doctests

* Update docs. Removed a limitation.
2022-03-21 11:09:56 -07:00
Ilya Bogdanov
cdcc852e03
Node searcher zoom & edited node growth/shrink animation (#3327)
In this PR two things are implemented:
1. Node Searcher zoom factor (and therefore its size) is fixed no matter how you move the main camera. The node searcher is also positioned directly below currently edited node at all times.
2. Node growth/shrink animation when you start/finish node editing. After animation end the edited node zoom factor is also fixed and matches the zoom factor of the node searcher.

See attached video with different ways of editing/creating nodes:

https://user-images.githubusercontent.com/6566674/157348758-2880aa2b-494d-46e6-8eee-a22be84081ed.mp4


#### Technical details

1. Added several additional scene layers for separate rendering: `node_searcher`, `node_searcher_text`, `edited_node`, `edited_node_text`. Searcher is always rendered by `node_searcher` camera, edited node moves between its usual layers and `edited_node` layer. Because text rendering uses different API, all node components were modified to support change of the layer.
2. Also added `node_searcher` DOM layer, because documentation is implemented as a DOM object.
3. Added two FRP endpoints for `ensogl::Animation`: `on_end` and `set_value`. These endpoints are useful while implementing growth/shrink animation.
4. Added FRP endpoints for the `Camera2d`: `position` and `zoom` outputs. This allows to synchronize cameras easily using FRP networks.
5. Growth/shrink animation implemented in GraphEditor by blending two animations, similar to Node Snapping implementation. However, shrinking animation is a bit tricky to implement correctly, as we must always return node back to the `main` scene layer after editing is done.
2022-03-17 10:38:18 +00:00
Ilya Bogdanov
11dfd7bfc9
Return creating node with (+) button & fix a regression (#3338)
* Creating a new node with the (+) button (#3278)

[The Task](https://www.pivotaltracker.com/story/show/180887253)

A new (+) button on the left-bottom corner appeared. It may be clicked to open searcher in the middle of the scene, as an alternative to tab key.

https://user-images.githubusercontent.com/3919101/154514279-7972ed6a-0203-47cb-9a09-82dba948cf2f.mp4

* The window_control_buttons::common was extracted to separate crate `ensogl-component-button` almost without change.
* This includes a severe refactoring of adding nodes in general in the Graph Editor. The whole responsibility of adding new nodes (and starting their editing) was moved to Graph Editor - the Project View only reacts for GE events to show searcher properly.
* The status bar was moved from the bottom-left corner to the middle-top of the scene. It does not collide with (+) button, and plays "notification" role anyway.
* The `interface` debug scene was buggy. The problem was with one expression's span-tree. When I replaced it, the scene works.
* I've removed "new searcher" API, as it is completely outdated.
* I've changed code owners of integration tests to GUI team, as it is the team writing mostly the integration tests (int rust)

* Fix regression #181528359

* Add docs & remove unused function

* Fix & enable native Rust tests

* Fix formatting

Co-authored-by: Adam Obuchowicz <adam.obuchowicz@enso.org>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-03-16 21:02:47 +03:00
Kaz Wesley
348abdb680
Generate reports about profiling results of top-level sections of the application. (#3306) 2022-03-15 03:12:39 +01:00
Wojciech Danilo
73f33d1c7f Linting codebase 2022-03-10 05:32:33 +01:00
Wojciech Daniło
f4d236fcd4
EnsoGL context abstraction (#3293) 2022-03-04 15:13:23 +01:00
Michael Mauderer
d3cc2c1025
Flame Graph for Profiling Data (#3297)
Add an API to create a flame graph from profiling data. Also adds a demo scene showcasing the functionality that generates some profiling data by measuring dummy function calls and rendering a flame graph for the dummy data (see video for the result).

Not that the functionality is not yet exposed user-facing in the GUI itself, but only as API and demo scene, therefore [ci no changelog needed]

https://user-images.githubusercontent.com/1428930/155118977-ecac0628-777c-48bd-9aa7-30ee6aef1976.mp4

# Important Notes
* Change from the initial design: labels are shown on the flame graph instead of as a tooltip. This is because tooltips are currently only implemented in the graph editor and would require some additional refactoring (probably taking the better part of a day).
* re-instated the behaviour that logs are shown in the JS console if development mode is active.
2022-03-03 22:23:27 +00:00
Mateusz Czapliński
8f61ec174e
Fix Scroll Area demo scene (#3261)
Fix the `scroll-area` example scene, so that a red circle inside the scroll area, and a gray rounded rectangle representing the background of the scroll area, are now both visible.

Previously, adding just a `Sprite` (instead of a corresponding `SpriteSystem`) to the scene resulted in the underlying `Symbol` not being added to a visible `Layer`. (Notably, `Sprite::display_object()` is not the same as `Sprite::symbol.display_object()`.)

https://www.pivotaltracker.com/story/show/180459079
2022-02-17 13:01:53 +01:00
Michael Mauderer
32cfb0333a
Bump Rust toolchain to nightly-2022-01-20. (#3255) 2022-02-16 12:58:02 +00:00
Mateusz Czapliński
593a603582
Revert "Add code allowing calculation of EnsoGL stats summaries (#3252)" (#3268)
This reverts commit e69e8078c3.

The removed code (stats aggregation and `stats` demo scene) will not be needed by the profiling framework, as discussed on chat.

(reverts changes introduced as part of https://www.pivotaltracker.com/story/show/181093920)
2022-02-11 15:23:46 +01:00
Adam Obuchowicz
c68ac5c0d6
Integration Test Framework (#3257) 2022-02-11 13:19:02 +01:00
Mateusz Czapliński
e69e8078c3
Add code allowing calculation of EnsoGL stats summaries (#3252)
This change adds utility code for calculating summaries from multiple samples (snapshots) of EnsoGL runtime stats values.

This internal feature is expected to be used by Enso IDE performance profiling tools, which are planned to be added in the near future.

https://www.pivotaltracker.com/story/show/181093920

A demo scene named `stats` was added, showcasing how to perform calculations using the new tools. Currently, the summary calculations in the scene work only when the EnsoGL stats Monitor Panel is visible; this is planned to be improved in a future task (https://www.pivotaltracker.com/story/show/181093601).

 - Note: the stats aggregation code is intended to be later used in Enso IDE's main rendering loop, so it needs to have very good performance characteristics. 
     - Due to that, `Accumulator` was designed to only use simple addition arithmetic, and be constant-memory once created.
2022-02-08 14:58:46 +01:00
Adam Obuchowicz
c4d22102cf
Switch to 2021 edition (#3173) 2021-12-01 16:06:57 +01:00
Adam Obuchowicz
99b0c46d87
While testing, developers should not have to wait for each crate to be re-built. (#3168)
Split all the EnsoGL components, examples and debug scenes to separate crates, so the work on the single component should be quicker than before.
2021-11-30 12:27:50 +01:00
Adam Obuchowicz
9ab4f45e72
Refactored enso-data crate and text utilities. (#3166) 2021-11-25 11:45:42 +01:00
Adam Obuchowicz
753f787a6f
Refactored config crate + moving crates to lib/rust directory. (#3155) 2021-11-12 13:56:23 +01:00