[ 
https://issues.apache.org/jira/browse/YUNIKORN-1713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Craig Condit closed YUNIKORN-1713.
----------------------------------

> Pass EventRecord as value instead of pointer
> --------------------------------------------
>
>                 Key: YUNIKORN-1713
>                 URL: https://issues.apache.org/jira/browse/YUNIKORN-1713
>             Project: Apache YuniKorn
>          Issue Type: Sub-task
>          Components: core - scheduler
>            Reporter: Peter Bacsko
>            Assignee: Peter Bacsko
>            Priority: Major
>
> Currently, we're passing around {{si.EventRecord}} objects as a pointer to a 
> value. The idea is that by keeping just a single value in memory, we reduce 
> copying. However, this causes heap allocations, which puts pressure on the 
> GC, plus dereferencing also has costs. 
> Also, modification to a structure is reflected in the original object. We 
> rarely want this without adequate locking. 
> Since this is a simple struct that is based on a protobuf definition, we 
> should abandon heavy pointer usage and just pass it as value.
> See a relevant benchmark about passing  struct as value vs pointer:
> https://medium.com/a-journey-with-go/go-should-i-use-a-pointer-instead-of-a-copy-of-my-struct-44b43b104963



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to