netsurf-plan9 / netsurf

netsurf
Other
45 stars 2 forks source link

Proper scheduler implementation #1

Closed telephil9 closed 3 years ago

telephil9 commented 4 years ago

In native frontend the scheduler is implemented with etimer() and sleeping for a fixed duration. Any callback scheduled with a timeout below the configured timer duration (see frontends/plan9/schedule.h) will never be called. Second side effect of this is that it forced us to increase webfs scheduled updates period thus reducing our download speed.

One possible solution would be to implement the scheduler using rfork and estart and to sleep within the forked block for the duration of the closest timeout.

telephil9 commented 3 years ago

fixed in 7d61d2f847ea8496a72845e05f8453aa9ebfd4c5