Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

remove allocations round two #84

Merged
merged 2 commits into from
Feb 27, 2019
Merged

remove allocations round two #84

merged 2 commits into from
Feb 27, 2019

Conversation

Stebalien
Copy link
Member

@Stebalien Stebalien commented Feb 21, 2019

  1. Remove indirection from bsmsg.Entry.
  2. Use a pool for AddMessage messages. This showed up in a pprof allocation count profile (top 5) while pinning.

@ghost ghost assigned Stebalien Feb 21, 2019
@ghost ghost added the status/in-progress In progress label Feb 21, 2019
@Stebalien Stebalien changed the title nit: remove bsmsg.Entry redirection remove allocations round two Feb 21, 2019
Copy link
Contributor

@hannahhoward hannahhoward left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable.

I need to get better with pprof usage so I can discover stuff like this.

@hannahhoward
Copy link
Contributor

Honestly, I was just thinking about this, and I wonder if these messages themselves should just be pass by value. (i.e. make the receiver for the handle function the value) Can you do that? Cause it seems to me you should never actually be modifying the properties of the message (which are effectively just parameters passed over a channel) inside the handle function.

@Stebalien
Copy link
Member Author

Stebalien commented Feb 21, 2019 via email

@hannahhoward
Copy link
Contributor

yea makes sense. I read up on the rules of escape analysis and it seems you are right.

@Stebalien Stebalien merged commit ee93aa8 into master Feb 27, 2019
@ghost ghost removed the status/in-progress In progress label Feb 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants