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

SafeSubscriber memory reduction #1237

Merged
merged 1 commit into from
May 21, 2014

Conversation

akarnokd
Copy link
Member

For #1204. This saves 24 bytes per instance.

@cloudbees-pull-request-builder

RxJava-pull-requests #1138 SUCCESS
This pull request looks good

benjchristensen added a commit that referenced this pull request May 21, 2014
@benjchristensen benjchristensen merged commit 62e68d5 into ReactiveX:master May 21, 2014
@benjchristensen
Copy link
Member

Thanks. I think we probably should do this all over. I haven't merged my change to CompositeSubscription yet so that needs to be done as well.

@benjchristensen
Copy link
Member

Oh, you already have a PR for CompositeSubscription as well :-)

@daschl
Copy link
Contributor

daschl commented May 22, 2014

@akarnokd @benjchristensen why was there a change from boolean to int?

@akarnokd akarnokd deleted the SafeSubscriberMemory branch May 22, 2014 07:20
@akarnokd
Copy link
Member Author

There is no AtomicBooleanFieldUpdater and the nearest thing is an AtomicIntegerFieldUpdater. Since classes are padded to 4-8 byte boundaries anyway, moving from 1 byte boolean to 4 byte integer is no extra overhead.

@daschl
Copy link
Contributor

daschl commented May 22, 2014

oh I just checked you are right. that explains a lot, but I have no clue why they didn't add that.

@benjchristensen benjchristensen mentioned this pull request Jun 1, 2014
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.

4 participants