You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm questionably trying to make discord store some big files, by splitting them and sending in chunks, and it seems there are slowdowns esspecially on debug builds, because sernity first turns the bytes into base64, and then inserts the string, which causes a realloc and a memcopy of some pretty large sections of memory (and this already happens a lot, because I have to split files, and then pass them to create attachment, which is another copy...... yeah this runs really slowly with big files on my old laptop)
and yes, I have profiled the code, this just seemed like an odd hotspot and an easy fix
anyways this function just seems easier and less of a breaking change than turning CreateAttachment
I'm questionably trying to make discord store some big files, by splitting them and sending in chunks, and it seems there are slowdowns esspecially on debug builds, because sernity first turns the bytes into base64, and then inserts the string, which causes a realloc and a memcopy of some pretty large sections of memory (and this already happens a lot, because I have to split files, and then pass them to create attachment, which is another copy...... yeah this runs really slowly with big files on my old laptop)
and yes, I have profiled the code, this just seemed like an odd hotspot and an easy fix
anyways this function just seems easier and less of a breaking change than turning
CreateAttachment
I suggest an adimtedly much less simple implementation more like:
The text was updated successfully, but these errors were encountered: