Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always assign new expression to a value #2645

Closed
4e6 opened this issue Dec 15, 2020 · 1 comment
Closed

Always assign new expression to a value #2645

4e6 opened this issue Dec 15, 2020 · 1 comment
Assignees

Comments

@4e6
Copy link
Contributor

4e6 commented Dec 15, 2020

General Summary

In the main flow, when we add node after node, we usually attach the visualization to the last expression. It is not cached, and the engine has to recompute it.

main =
    list = 1.up_to 10 . to_vector
    operator1 = list.filter (>5)
    list.map (+1)

The engine cannot cache the intermediate expressions because then it can't guarantee that the program won't run out of memory.

An easy fix would be, when creating a new node in IDE, always assign it to a value.

main =
    list = 1.up_to 10 . to_vector
    operator1 = list.filter (>5)
    operator2 = list.map (+1)
    operator2

Motivation

Improve visualization performance

@farmaazon
Copy link
Contributor

I see a couple of problems here:

  1. Yes, we can assign a new value to the node. However, the user will be able to put line without assignment in Code Editor. I understand, that then the visualization won't be cached?
  2. For methods returning Nothing assigning to variable has no sense. But we don't know if node return Nothing until we actually place it.

@farmaazon farmaazon self-assigned this Feb 1, 2021
@mwu-tow mwu-tow transferred this issue from enso-org/ide Oct 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants