Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

websocket flooded with ~20 events per second #3800

Closed
sfavorite opened this issue Aug 31, 2022 · 0 comments · Fixed by #3804
Closed

websocket flooded with ~20 events per second #3800

sfavorite opened this issue Aug 31, 2022 · 0 comments · Fixed by #3804

Comments

@sfavorite
Copy link

sfavorite commented Aug 31, 2022

ALL software version info

panel 0.13.1
holoviews 1.15.0
python 3.7.12

ubuntu 22.04 LTS using Firefox 102.0.1
(also see it on macOS Monterey 12.4 as host using Safari v15.5)

Installed in a new conda env:
conda install -c pyviz holoviews bokeh panel

Description of expected behavior and the observed behavior

Expected: Run from 'panel serve' with --autoreload flag, updates on changes to source file and user interaction via websocket.

Observed: Websocket is getting multiple messages, approx 20/sec, with no file changes or user interaction on the application. If I don't use --autoreload the messages are as expected.

Complete, minimal, self-contained example code that reproduces the issue

Vanilla template code from panel website

import panel as pn
import numpy as np
import holoviews as hv

pn.extension(sizing_mode = 'stretch_width')

vanilla = pn.template.VanillaTemplate(title='Vanilla Template')

xs = np.linspace(0, np.pi)
freq = pn.widgets.FloatSlider(name="Frequencyb", start=0, end=10, value=2)
phase = pn.widgets.FloatSlider(name="Phase", start=0, end=np.pi)

@pn.depends(freq=freq, phase=phase)
def sine(freq, phase):
    return hv.Curve((xs, np.sin(xs*freq+phase))).opts(
        responsive=True, min_height=400)

@pn.depends(freq=freq, phase=phase)
def cosine(freq, phase):
    return hv.Curve((xs, np.cos(xs*freq+phase))).opts(
        responsive=True, min_height=400)

vanilla.sidebar.append(freq)
vanilla.sidebar.append(phase)

vanilla.main.append(
    pn.Row(
        pn.Card(hv.DynamicMap(sine), title='Sine'),
        pn.Card(hv.DynamicMap(cosine), title='Cosine')
    )
)
vanilla.servable();


$ panel serve --autoreload vanilla.py

Stack traceback and/or browser JavaScript console output

Screenshots or screencasts of the bug in action

Screenshot from 2022-08-31 16-11-08
Screencast from 08-31-2022 04:55:36 PM.webm
console 2022-08-31 19-15-33
cli 2022-08-31 19-16-20
Screencast from 08-31-2022 04:55:36 PM.webm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants