Marco Arment
👤 SpeakerAppearances Over Time
Podcast Appearances
So it isn't like allocating everything. It isn't rendering the entire list. It's just rendering the part that you are looking at. So theoretically, it should be fairly linear. Like the performance of the list should be about the same no matter how many items it has. Now, there are a few things that can break that assumption.
So it isn't like allocating everything. It isn't rendering the entire list. It's just rendering the part that you are looking at. So theoretically, it should be fairly linear. Like the performance of the list should be about the same no matter how many items it has. Now, there are a few things that can break that assumption.
and require the frameworks to load all the items or to render all the cells. That can be things like if they are variable heights and you want an accurate scroll indicator of where you are in the list position, then the framework has to render every cell to know, well, how tall are all the cells? So I know how tall is the total view, so I know where to put the scroll indicator.
and require the frameworks to load all the items or to render all the cells. That can be things like if they are variable heights and you want an accurate scroll indicator of where you are in the list position, then the framework has to render every cell to know, well, how tall are all the cells? So I know how tall is the total view, so I know where to put the scroll indicator.
And there's also things like, well, where are the cell content? Does one cell's content depend on another cell's content? Or does something depend on the content of all the cells in order to render it?
And there's also things like, well, where are the cell content? Does one cell's content depend on another cell's content? Or does something depend on the content of all the cells in order to render it?
And so there are little pitfalls you can fall into that will require the framework to load or render everything rather than loading and rendering only what is on screen and kind of paging in the data dynamically. And it can be very, very easy to accidentally fall into one of those pitfalls. And this was true of both UIKit and SwiftUI. AppKit I never really used, so I don't really know.
And so there are little pitfalls you can fall into that will require the framework to load or render everything rather than loading and rendering only what is on screen and kind of paging in the data dynamically. And it can be very, very easy to accidentally fall into one of those pitfalls. And this was true of both UIKit and SwiftUI. AppKit I never really used, so I don't really know.
But definitely UIKit and SwiftUI both had the potential for a UI table view or a list, respectively, or a lazy vGrid or whatever. they all had the potential to make some small decision or some small mistake or not flag something correctly in the code, and it would have to render the entire list every time. So I'm guessing that now, and on iOS, I can tell you, I don't have this problem.
But definitely UIKit and SwiftUI both had the potential for a UI table view or a list, respectively, or a lazy vGrid or whatever. they all had the potential to make some small decision or some small mistake or not flag something correctly in the code, and it would have to render the entire list every time. So I'm guessing that now, and on iOS, I can tell you, I don't have this problem.
Like using SwiftUI list on iOS, like I tested my playlist screen with 100,000 items and it scrolls just as well and just as smoothly as it does with 20 items. So I'm pretty sure I don't have this problem with Overcast, and that's just a SwiftUI list.
Like using SwiftUI list on iOS, like I tested my playlist screen with 100,000 items and it scrolls just as well and just as smoothly as it does with 20 items. So I'm pretty sure I don't have this problem with Overcast, and that's just a SwiftUI list.
Well, you'd be surprised what people try to do. But that's why I have a test account that has 100,000 podcasts in it. Trust me, people do some interesting stuff. Anyway, so I can tell you that SwiftUI, this is not an inherent problem to SwiftUI in general as a concept.
Well, you'd be surprised what people try to do. But that's why I have a test account that has 100,000 podcasts in it. Trust me, people do some interesting stuff. Anyway, so I can tell you that SwiftUI, this is not an inherent problem to SwiftUI in general as a concept.
It has that same optimization that UITableView has of only loading certain cells on screen and buffering in, changing their content. It does that same thing, or at least it can do that same thing. on iOS where I've used it.
It has that same optimization that UITableView has of only loading certain cells on screen and buffering in, changing their content. It does that same thing, or at least it can do that same thing. on iOS where I've used it.
Now the problem is, again, there are all these different pitfalls, like you could be inadvertently triggering it to do a full render with some detail of how you've implemented it. Or it's also possible that that optimization doesn't work
Now the problem is, again, there are all these different pitfalls, like you could be inadvertently triggering it to do a full render with some detail of how you've implemented it. Or it's also possible that that optimization doesn't work
or it doesn't work correctly on mac os because swift ui on mac os is a little bit of it's like they don't it's not nearly as as tested and mature as it is on ios so i can tell you this is probably not a problem with swift ui overall but it might be a problem with swift ui the way you are using it or it might be a problem swift ui on the mac
or it doesn't work correctly on mac os because swift ui on mac os is a little bit of it's like they don't it's not nearly as as tested and mature as it is on ios so i can tell you this is probably not a problem with swift ui overall but it might be a problem with swift ui the way you are using it or it might be a problem swift ui on the mac