c-smile / sciter-sdk

Sciter is an embeddable HTML/CSS/scripting engine
http://sciter.com
Other
2.11k stars 224 forks source link

1000+ Data performance #216

Closed xxscloud5722 closed 2 years ago

xxscloud5722 commented 2 years ago
<script type="text/javascript">
    setTimeout(() => {
        let ul = '';
        for (let i = 0; i < 10000; i++) {
            ul = ul + '<li>DD: ' + i + '</li>'
        }
        document.querySelector('#vlist').append(ul)
    })
</script>
  • xxxx
  • mac 12.0.1, sciter 4.6.x, 10000 data is very stuck, dragging to a point and scrolling will get stuck for one second

    xxscloud5722 commented 2 years ago
    <vlist id="vlist">
        <li>xxxx</li>
    </vlist>
    xxscloud5722 commented 2 years ago

    Drag the scroll bar to any position, then the scrolling data will be stuck for a second

    c-smile commented 2 years ago

    Please try the same in Sciter JS SDK https://github.com/c-smile/sciter-js-sdk/tree/main/samples.sciter/virtual-list Will you see the same problem?

    xxscloud5722 commented 2 years ago

    Sorry, can you have a JS demo? I think using vlist can achieve big data loading

    xxscloud5722 commented 2 years ago

    I am downloading the SDK for tis Test results later

    xxscloud5722 commented 2 years ago

    Sorry, can you have a demo of js

    c-smile commented 2 years ago
    <script type="text/javascript">
        setTimeout(() => {
            let ul = '';
            for (let i = 0; i < 10000; i++) {
                ul = ul + '<li>DD: ' + i + '</li>'
            }
            document.querySelector('#vlist').append(ul)
        })
    </script>

    you create 10000 DOM elements.

    It should not be a surprise that you have runtime delays.

    You shall use virtual list to show potentially large sets.