You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] RingsDetection test did not meet expectations #275
always return the same Object is reduce memory pressure and avoid GC
Yep~ But semantically, messages.next() returns a different address object more intuitive.
Otherwise, someone who call this function downstream need to clearly know that the same object is returned here, which is not logically intuitive and easy to make mistakes.
I agree this is a problem, it sacrifices user-friendliness for performance.
We hope that after the memory management module is added, this confusion can be solved.
it's tracked by #277
Activity
diaohancai commentedon Oct 25, 2023
Possible solutions:
org.apache.hugegraph.computer.core.compute.input.MessageInputmessages.next()return a different address Object.corgiboygsj commentedon Oct 25, 2023
always return the same Object is reduce memory pressure and avoid GC
diaohancai commentedon Oct 25, 2023
Yep~ But semantically,
messages.next()returns a different address object more intuitive.Otherwise, someone who call this function downstream need to clearly know that the same object is returned here, which is not logically intuitive and easy to make mistakes.
Do we have some more elegant solutions?
corgiboygsj commentedon Oct 26, 2023
@javeme please take a look for this question. This does make it confusing for users.
javeme commentedon Oct 29, 2023
I agree this is a problem, it sacrifices user-friendliness for performance.
We hope that after the memory management module is added, this confusion can be solved.
it's tracked by #277