Performance: do not fetch extra post data unless needed #87
Labels
Difficulty/2:Medium
Medium ticket
Help Wanted
Community help wanted
Tech/Go
Type/Enhancement
New feature or improvement of existing feature
Presently, processing each post autolink goes back to the server to get the Channel and Team names for it, to match the scope. https://github.com/mattermost/mattermost-plugin-autolink/blob/0c286d8baa27c03834c2240c0e20fd518b4ec83d/server/autolinkplugin/plugin.go#L104-L117
Scope
defined, there's no perf impact.MessageWillBePostedEx
that would contain extended metadata (channel and team names in this case) and will not require extra roundtrips. cc @lieut-dataScope
to perform only exact matches on teams and channels, rather than the presentcontains
(by keyword). Maybe we add new fieldsChannel
andTeam
that are exact matches? This would allow pre-resolving all references on Config and comparing by ID, avoiding the extra per-message RPCs.The text was updated successfully, but these errors were encountered: