flink-cdc icon indicating copy to clipboard operation
flink-cdc copied to clipboard

[FLINK-35762] Cache hashCode for TableID & Transform descriptors

Open yuxiqian opened this issue 1 year ago • 1 comments

This closes FLINK-35762.

As previously discussed offline with @lvyanquan, HashMap lookup could be slow since we must calculate key hash code every time, though most key objects are immutable.

A common practice in Java world is caching object hash code in a transient field, just like what java.lang.String does. In CDC code, TableId & transform rule types are frequently used as HashMap key type, and their hash code could be safely cached since their instances are immutable.

yuxiqian avatar Jul 05 '24 06:07 yuxiqian

This pull request has been automatically marked as stale because it has not had recent activity for 60 days. It will be closed in 30 days if no further activity occurs.

github-actions[bot] avatar Oct 13 '24 00:10 github-actions[bot]

This pull request has been closed because it has not had recent activity. You could reopen it if you try to continue your work, and anyone who are interested in it are encouraged to continue work on this pull request.

github-actions[bot] avatar Nov 13 '24 00:11 github-actions[bot]