mirror of
git://git.yoctoproject.org/yocto-autobuilder2.git
synced 2025-07-19 20:59:02 +02:00
yocto_console_view: Handle change notification performance issues
The previous approach was basically repeatedly adding change nofification calls recursively which could lock up the browser. It turns out nofitications are not being generated properly in upstream buildbot. https://github.com/buildbot/buildbot/issues/4321 https://github.com/buildbot/buildbot/pull/4323 For now accept a UI regression which will get fixed when the above is fixed. Avoid the current performance problems. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
681db49a98
commit
c4b8a6ea0e
|
@ -87,16 +87,15 @@ class Console extends Controller
|
|||
|
||||
@builds.onChange = @changes.onChange = @buildrequests.onChange = @buildsets.onChange = @onChange
|
||||
|
||||
@dataAccessor.getBuilds().onChange = (builds) =>
|
||||
for b in builds
|
||||
b.getProperties().onChange = (properties) =>
|
||||
buildid = properties.endpoint.split('/')[1]
|
||||
if ! @maping[buildid]
|
||||
rev = @getBuildProperty(properties[0], 'yp_build_revision')
|
||||
if rev?
|
||||
@maping[buildid] = rev
|
||||
if not @onchange_debounce?
|
||||
@onchange_debounce = @$timeout(@_onChange, 100)
|
||||
@builds.onNew = (build) =>
|
||||
build.getProperties().onChange = (properties) =>
|
||||
buildid = properties.endpoint.split('/')[1]
|
||||
if ! @maping[buildid]
|
||||
rev = @getBuildProperty(properties[0], 'yp_build_revision')
|
||||
if rev?
|
||||
@maping[buildid] = rev
|
||||
if not @onchange_debounce?
|
||||
@onchange_debounce = @$timeout(@_onChange, 100)
|
||||
|
||||
getBuildProperty: (properties, property) ->
|
||||
hasProperty = properties && properties.hasOwnProperty(property)
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user