Skip to content
This repository was archived by the owner on May 13, 2020. It is now read-only.

Conversation

shoheiyokoyama
Copy link
Member

@shoheiyokoyama shoheiyokoyama commented Jun 14, 2018

Description

Reducer and Middleware are aliases of closure. closure is Reference Type as apple doc

Array of reference types should use ContiguousArray.
For ContiguousArray, it is described in Apple document as follows.

If you need an array of reference types and the array does not need to be bridged to NSArray, use ContiguousArray instead of Array
Ref: Advice: Use ContiguousArray with reference types when NSArray bridging is unnecessary

using ContiguousArray may be more efficient and have more predictable performance than Array.
Ref: ContiguousArray

I replaced Array type of reducers and middlewares with ContiguousArray.

Checklist

  • this PR is based on develop or a 'develop related' branch
  • the commits inside this PR have explicit commit messages
  • the Jazzy documentation has been generated (if needed -> Jazzy RxReduce)

@shoheiyokoyama
Copy link
Member Author

@twittemb
What is the option to generate Jazzy documentation? author, author_url, github_url, etc.

@twittemb
Copy link
Collaborator

Hi

In general I pass no particular option, just 'jazzy RxReduxe'

@shoheiyokoyama
Copy link
Member Author

@twittemb
I just updated jazzy documentation.

@twittemb
Copy link
Collaborator

Thanks. I didn't know about Contiguous arrays. Thanks for sharing all the optimization tips.

I'll merge the PR asap.

👍

@twittemb twittemb self-requested a review June 14, 2018 03:07
@twittemb twittemb self-assigned this Jun 14, 2018
@twittemb twittemb added the enhancement New feature or request label Jun 14, 2018
@twittemb twittemb merged commit aa8182f into RxSwiftCommunity:develop Jun 14, 2018
@twittemb
Copy link
Collaborator

Thanks @shoheiyokoyama

@shoheiyokoyama shoheiyokoyama deleted the use-ContiguousArray branch June 14, 2018 03:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants