i have a bot with a task that fetches all members from a guild, and stores them in a database. The server has less than 1000 members, but the bot uses more and more time to process the members.
i use await guild.gateway_chunk() to fetch the members, and then iterate over them to see if anyone has joined or left.
After enabling logging i see that the number of members processed just keeps increasing, the same does the time. Is this intended behaviour? Why are we saving the same members in the cache several times?
bot-1 | 2024-08-20 18:05:44,609 - interactions - INFO - Cached members for 888378227679195147 in 2.10 seconds
bot-1 | 2024-08-20 18:06:42,531 - interactions - INFO - Processing 45650 members for 888378227679195147
bot-1 | 2024-08-20 18:06:44,679 - interactions - INFO - Cached members for 888378227679195147 in 2.15 seconds
bot-1 | 2024-08-20 18:07:42,521 - interactions - INFO - Processing 46563 members for 888378227679195147
bot-1 | 2024-08-20 18:07:44,723 - interactions - INFO - Cached members for 888378227679195147 in 2.20 seconds