badoo / RIBs

Badoo's take on RIBs
Apache License 2.0
162 stars 50 forks source link

Remove Handler abuse from OngoingTransition #291

Closed CherryPerry closed 3 years ago

CherryPerry commented 3 years ago
    private val checkFinishedRunnable = object : Runnable {
        override fun run() {
            if (transitionElements.any { it.isPending() }) {
                handler.post(this)
            } else {
                finish()
            }
        }
    }

This is 100% CPU load on the main thread while transition animations are running, making them less smooth.

zsoltk commented 3 years ago

@SamuPS FYI