Faster (and smaller) uploads in Discourse with Rust, WebAssembly and MozJPEG | Blog

Freakin’ radical, man.

Bill Murray Thank You GIF by filmeditor

7 Likes

Getting lots of complaints from Android users about jumping cursors and degraded upload performance, unfortunately.

1 Like

I have a PR open that will greatly improve the cursor/placeholder handling during multiple file uploads

If all of the following are true:

  • You don’t care about storage costs
  • Most of your user base has good internet upload
  • Most of your audience browses from average or worse Android phones

You may want to either disable the feature or tweak the threshold for minimum size up a few megabytes.

8 Likes

That’s great to hear!

Sadly, many of my users have cheap-ish/older Android phones, so I won’t be re-enabling the feature any time soon. Haven’t had any problems myself on my iPhone 12.

3 Likes

Falco, would it be possible or of interest to provide a user setting for this, so people who want it can choose to use it? Or an option to “use classic image uploader” as craigslist does it? Selecting that button toggles the upload method.

3 Likes

Maybe tweak the minimum size for it, so it’s only triggers on file larger than 3MB, so old phones won’t reach it on their own camera pictures.

That was included in the original RFC but it was removed according to the comments received.

4 Likes

Hi Rafael,

I think we have a little problem with the new placeholder handling. It seems the images goes inline not a new line. Not just on composer pre optimization but regular uploads too. Thanks :slightly_smiling_face:

4 Likes

This should fix it

7 Likes

Hello Rafael,

Sorry I am late but tested just now. :confused: It works fine on multiple uploads if i drag images in new line but it seems the issue still there if drag image(s) the end of a text. Thank you :slightly_smiling_face:

3 Likes

Is it all good now @dodesz?

4 Likes

It seems to this one still happening.

3 Likes

Has this been fixed? @Falco

3 Likes

Sorry, what is a bug in that video? That looks exactly as I would expect it to work?

4 Likes

I missed this feature A setting to always insert images as separate paragraphs - #16 by andrei which is I think works well until this commit Faster (and smaller) uploads in Discourse with Rust, WebAssembly and MozJPEG | Blog - #9 by Falco not sure. :confused:

I have a video from my community about this feature when I presented to the members.

4 Likes

@sam can we address the above before the release please?

4 Likes

From what I can tell @andrei’s change was tightly scoped to the toolbar, increasing the scope so it also catches drag-and-drop and paste would be a bit risky for the release.

Also unsure if we want to do that?

8 Likes

5 posts were split to a new topic: Caret moves to end-of-line when uploading an image via toolbar

I’ll fix it and then we can decide if the fix is dangerous to merge before release.

6 Likes

As I remember and from what I see in the code, it doesn’t matter if an image was added using toolbar or using drag-and-drop. In both cases, this should work.

Also, I tested it and looks like now everything works as expected (it’s hard to tell when exactly this was fixed, but I think it’s not so important). Here are videos for drag-and-drop, but it also works when using toolbar.

In the middle of the line:

At the end of the line:

At the end of the last line:

7 Likes

Oh yeah sorry that’s my fault I didn’t even tested it since the last video I uploaded. :confused: Now it works as expected :slightly_smiling_face: Thank you @andrei to check this.

5 Likes