ripe-tech/ripe-sdk

SDK slow response when doing setInitialsExtra

Closed this issue ยท 7 comments

Description

SDK takes too long to update images when calling for several setInitialsExtra.

In practice ripe-white takes much longer - more than 2x the amount of time - than RIPE API to render an image after user initials requests.

I believe this has to do with SDK's implementation to cancel old requests - it's not working as expected.

Please watch the videos below.

Expected vs. Observed

- -
Expected The image should render what it's typed on white right away, not the first character and then the whole word.
Observed The observed state at the end of the repro steps.

Repro Steps

  1. Open ripe-white https://ripe-white-now.platforme.com/?context=saint_laurent_hoodie
  2. Write something in initials input with more than 1 character like "1234"
  3. Watch the image first render an image with the first character "1" and only then "1234" no matter how fast it's typed

Videos

From RIPE White

Peek.2022-02-18.11-27.mp4

From YSL's Website

2022-02-14_15h20_05.mp4

Woof, Woof!

Thank you @SDK slow response when doing setInitialsExtra for submitting the "SDK slow response when doing setInitialsExtra" issue ๐Ÿ˜Ž.

Please do not forget to review our internal guidelines:

  • Describe the problem in the best possible way
  • Include at least the Description section, but considered adding other sections
  • Avoid suggesting immediate solutions, think deeply about the problem
  • Engage in the Triage process being as responsive as possible
  • Understand and accept the possibly large amount of execution time
  • Avoid immediate reallocation of the issue, let triage do their job

Engaging in the development process in the best possible way helps it being efficient and fast.

Your friend,
Tobias (Platforme's mascot)

Tobias Bot

This can be solved by implementing a debouncer when doing setInitialsExtra.

Now this debouncer could be implemented at SDK level and enabled/disabled with a certain timer by default or we just don't implement it and instead pass that responsibility to whoever uses the SDK.

@joamag I'd say this is a point of discussion in tech decision.

discussion

Yes, let's implement it at the SDK level. On top of that let's cancel previous requests when new ones arise if needed.

On top of that let's canceled previous requests when new ones arise, if needed.

That one is already implemented

Ok, going ahead with the debouncer implementation at SDK level for the setInitialsExtra.

@3rdvision Is this story ready for QA? If so, please update the Kanban board ๐Ÿ˜„

We no longer see the first character being rendered first, and then rendering the rest of the inserted characters.
In that regard, the expectation is met.
Speed performance still is not ideal, @3rdvision will see what else can be done.

Ysl-rendering.mp4