Debounce temporary solution

I’m analyzing tina’s code, and I saw the debounce implementation there is the temporary solution comment. How serious is the original problem in this part of the code?

code in package: @tinacms/api-git/src/file-writer.ts

if (DEBUG)`write ${curr}: end; success`)
  waitingForBuild = true
  // Temp solution; we haven't figured out how to
  // call `buildFinished` when Gatsby's build actually
  // finishes.
    Number(process.env.TINA_GIT_DEBOUNCE_MS) || 1000'Rodando DEBOUNCE', process.env.TINA_GIT_DEBOUNCE_MS);
  setTimeout(buildFinished, TINA_GIT_DEBOUNCE_MS)

I would like to look for a solution for this implementation.

Feels like we should bring this conversation to GitHub, I haven’t use TinaCMS with Gatsby in a while but even with debounce, it seemed to be still an issue (see [Feature Request] Debounce changes / Preview button · Issue #1089 · tinacms/tinacms · GitHub)