[FFmpeg-devel] [RFC] AVDictionary2

Michael Niedermayer michael at niedermayer.cc
Fri Apr 11 22:06:08 EEST 2025


Hi

On Tue, Apr 08, 2025 at 09:30:16PM +0000, softworkz . wrote:
[...]

> To tell you the truth - at that point I was thinking: "Ah, clever! That's why the AVDictionary is done like that" 😊 

The dictionary implementation is not clever
look at copy for example it iterates over av_dict_set() which itself calls
av_dict_get() which it itself iterates over the dictionary
so av_dict_copy() is O(n^2) for example

also a single fate run, calls av_dict_iterate() 4921207 times
and fate should mostly be short small files and minimal self contained testcases

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Avoid a single point of failure, be that a person or equipment.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250411/9424f862/attachment.sig>


More information about the ffmpeg-devel mailing list