|
Good afternoon For a online shop backend I want to move away functionality from the Datables web app onto macOS... few things are just to complex to handle with a Datatables only solution (o; Especially for editing shop items with Datatables around 3800 rows are returned as JSON and displayed in the browser, while loading of the JSON to /dev/null takes itself around 300msecs.... How could SwiftUI lists performance be enhanced when dealing with row count between 2000 and 20000? Tried with a fix number of 2000 rows...and I see that the data is loaded as fast as with "wget -O /dev/null server.com/json.php"...but until the rows are displayed on macOS it takes almost 2 seconds....and for 5000 rows almost 5 seconds....so 1000 rows/second.... Is there a built-in functionality like Datatables has to load parts on demand when it knows the total number of rows in advance? Not sure how searching for specific rows would be affected as this is rather fast with Datatables on Safari. thanks in advance richard |
|
Maybe looking at the concurrency methods in last year's HWS Live 2021 might give you some ideas on how to approach this. As you have HWS+ you should be able to access this. |
|
I not sure the figures of speed you gave is it retrive from the server or loading into the UI on device? If latter you might look at using a |
|
OK... after doing some prototyping I can confirm the effects you see: under macOS a
What you see in above logs: SwiftUI is really creating all the 10'000 rows... Row 10000 is even appearing on screen in my case?! My row contains an
If you add more debugging code to the To speed things up, you can do the following: Fix the size of the row. Yes, I agree, this ugly... but by adding the following line
after the
I hope this solves your issue too. (To be honest: I have no idea why the code without restricting the |
|
SAVE 50% All our books and bundles are half price for Black Friday, so you can take your Swift knowledge further without spending big! Get the Swift Power Pack to build your iOS career faster, get the Swift Platform Pack to builds apps for macOS, watchOS, and beyond, or get the Swift Plus Pack to learn advanced design patterns, testing skills, and more.
This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.