For
historical reasons Trim - along with other filters - is declared internally as a NonCachedGenericVideoFilter.
Changing that back to GenericVideoFilter yields significant speed increase.
Such filters are: Trim, FreezeFrame, DeleteFrame, DuplicateFrame, Reverse and Loop