- Joined
- Jun 30, 2023
I was doing some messing around userscripts and managed to cut down bandwidth and memory usage a lot. I intentionally broke the
to prevent user avatars from loading on the user list on the right-hand side, since it no longer recognizes the avatar node as an image it must lazy load.
Of course, what I did here is a weird hack to block loading the images (without generating a shitload of errors from removing elements), but it illustrates how loading all those avatars in the user list (especially in gen chat) uses way more resources than it's worth. Without my patch, in the network tab, I would see on the bottom that the total amount of data transferred would quickly climb >100 MB within a few minutes. With my patch, it has barely climbed above 10 MB after 15 minutes.
Please consider removing the avatar embeds in the user list or an option to disable it (as long as an
tmp-chat-user <template> like this
HTML:
<template id="tmp-chat-user">
<div class="activity">
<a class="avatar" aria-hidden="true" src="" alt=""></a>
<a class="user"></a>
</div>
</template>
Of course, what I did here is a weird hack to block loading the images (without generating a shitload of errors from removing elements), but it illustrates how loading all those avatars in the user list (especially in gen chat) uses way more resources than it's worth. Without my patch, in the network tab, I would see on the bottom that the total amount of data transferred would quickly climb >100 MB within a few minutes. With my patch, it has barely climbed above 10 MB after 15 minutes.
Please consider removing the avatar embeds in the user list or an option to disable it (as long as an
<img> doesn't get its src set in the DOM). This not only saves users memory and bandwidth, but it saves you a considerable amount of bandwidth too. Win-win.
Last edited: