taipy icon indicating copy to clipboard operation
taipy copied to clipboard

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

Open AlexandreSajus opened this issue 1 year ago • 2 comments

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 avatar Jan 09 '24 09:01 AlexandreSajus

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

AlexandreSajus avatar Jan 12 '24 15:01 AlexandreSajus

proposal:

  • improve the rendering of the boolean (keep the toggle and make it efficient or replace it with a symbol that indicates the value (check box, T/F, 1/0, etc..)
  • If it fails, it must be documented, saying it can be replaced like the Alex workaround.

jrobinAV avatar Jan 12 '24 15:01 jrobinAV