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

Use lazy loading for content in tabs and sections #1143

Merged
merged 2 commits into from
Feb 15, 2024

Conversation

bekand
Copy link
Contributor

@bekand bekand commented Feb 14, 2024

Terms

THIS SOFTWARE IS CONTRIBUTED SUBJECT TO THE TERMS OF THE TERMS OF THE CCLA DATED 2017-11-07 WITH FINOS/LINUX FOUNDATION (FORMERLY THE SYMPHONY SOFTWARE FOUNDATION CCLA).

THIS SOFTWARE IS LICENSED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND ANY WARRANTY OF NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THIS SOFTWARE MAY BE REDISTRIBUTED TO OTHERS ONLY BY EFFECTIVELY USING THIS OR ANOTHER EQUIVALENT DISCLAIMER IN ADDITION TO ANY OTHER REQUIRED LICENSE TERMS.

@bekand bekand requested a review from AttilaMihaly February 14, 2024 15:27
@bekand bekand self-assigned this Feb 14, 2024
@bekand bekand added bug Something isn't working morphir-web labels Feb 15, 2024
@bekand
Copy link
Contributor Author

bekand commented Feb 15, 2024

The ifThenElse function increased readability in some cases, but every time it was used, both of it's arguments were evaluated, because of Elm's functional nature, and strict evaluation, so I removed the function and I'm using a simple if..then..else instead.
I also rewrote the Tabs and Section components, so the function producing their inner content doesn't get evaluated unless it's actually shown.
These two changes increase the performance of the UI significantly, especially for large models and/or long expressions.

@AttilaMihaly AttilaMihaly merged commit 6ef051a into finos:main Feb 15, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working morphir-web
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants