Avaiga / taipy

Turns Data and AI algorithms into production-ready web applications in no time.
https://www.taipy.io
Apache License 2.0
10.94k stars 775 forks source link

BUG-The display of multiple Bools in tables slows down the application #662

Open AlexandreSajus opened 8 months ago

AlexandreSajus commented 8 months ago

A table visual element will display boolean values like this: image

This looks great but unfortunately, when you have 100 rows and 10 columns of booleans, 1000 of these toggles are rendered on the page which slows down the application to the point where every interaction takes some time to be processed.

AlexandreSajus commented 7 months ago

For example: this is slow

import pandas as pd
from taipy.gui import Gui

value = 10
data = pd.DataFrame()

# Create 1O columns with 100 rows of bools
for i in range(10):
    data[i] = [True if j % value == 0 else False for j in range(100)]

page = """
<|{value}|slider|>
<|{data}|table|>
"""

Gui(page).run()

Replace True and False with 1 and 0 and things run faster

jrobinAV commented 7 months ago

proposal: