SwiftUI Table on macOS hanging with large number of rows

  • I am using SwiftUI Table View in my macOS application

  • The app uses a server-client paradigm where the client queries the server database and presents the fetch in a table.

  • I had used List earlier on, but I found it was not performant on macOS so I switched to using Table view.

  • the Table view on macOS was better than List but it suffers from a 'forever hang' where a beachball can last for minutes.

  • this occurs each time in this way:

  1. launch the app and the Table with 5000 rows load fine
  2. on update of the data, it hangs forever
  • interestingly, this does not occur on iOS.

I have a very simple test app that shows this issue but I cannot figure why the data update causes a hang and how to remedy this. I have tried applying an .id() to the Table but this did not help. Clearly, since the initial loading of the data is easily handled by the framework means that there is no inherent limit to the number of rows. There is something going on when applying an update to the table data.

Test Application here (I'm not certain how to make a public link on iCloud, so reply if it does not work):

https://www.icloud.com/iclouddrive/0867sf1ayePj8vd2gZblEL0UA#TableStressorTestMacOS

The link does not work. Can you file a feedback, attach the project to it, and share the feedback number?

@Zatman The Item isn't available in the Link you provided. You are either not sharing the folder, or you haven't given permission to open the item.

Either way, please file a file a feedback report and include the sample project. If you do so, please share your report ID here so we could investigate the issue.

Sorry, iCloud public sharing is not very obvious.

in any case, the Developer Tech Support is:

Case-ID: 9474931

Maybe this Dropbox link is better:

https://www.dropbox.com/scl/fi/i9usljzvqvae8lifxv3yj/TableStressorTestMacOS.zip?rlkey=agupzzdm9wr8v96lbuh9mm3mg&st=r4qtvjvl&dl=0

SwiftUI Table on macOS hanging with large number of rows
 
 
Q