Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize for more efficient and predictable performance by changing Array to CountiguousArray #825

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

wanderingfairy
Copy link

I changed to use ContiguousArray< UIViewController > type to store UIViewControllers in a contiguous block of memory.

When using a large number of UIViewControllers as tabs, I think that using ContiguousArray will yield more predictable performance compared to Array.

The changed source file is:

  • Sources/PagerTabStripViewController.swift

for Example:

  • BarExampleViewController.swift
  • ButtonBarExampleViewController.swift
  • InstagramExampleViewController.swift
  • NavButtonBarExampleViewController.swift
  • SegmentedExampleViewController.swift
  • SpotifyExampleViewController.swift
  • TwitterExampleViewController.swift
  • YoutubeExampleViewController.swift
  • YoutubeWithLabelExampleViewController.swift

References

Replace those declared as Array<ViewController> with Contiguous Array<UIViewController> type that is stored in contiguous blocks of memory.
Replace those declared as Array<ViewController> with Contiguous Array<UIViewController> type that is stored in contiguous blocks of memory.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant