Hello!
Is there a way to disable the live updates of a search or the bulk_update listener/websocket/API call in the network tab?.
For context, I’m trying to disable live updates on a particular search. While this is desirable most of the time, this can burn capacity for reports on a heavily used datatype.
Any suggestions?
P.S i know there’s the option of setting states, but sometimes this can’t take advantage of Bubble native search features.
Another option i’ve tried is setting this on a text/object, but that again doesn’t take advantage of bubble native search features.
P.S.S I also know there’s :make static - but this also doesn’t work in this scenario.
2 Likes
Wow, You tried all the ideas I would suggest.
The only thing I can come up with a debounce system to reduce the number of calls, but I can’t imagine that being simpler.
My inner @georgecollier would push back and wonder if that search is really consuming so much WU. Or if it is bringing that much value.
1 Like
window.kill_notifier_socket() will stop all real-time updates until the page refreshes but you can’t scope it to a particular search. Maybe this is okay if it’s an admin reporting page.
window.restore_notifier_socket() will reactivate real-time updates so if you’re careful and trigger it when the user ‘leaves’ the view you’re interested in then that works.
2 Likes
Wow ok that’s works better than expected:
window.kill_notifier_socket()
- normal searches run as expected
- no autoupdates
window.restore_notifier_socket()
- restores auto-update
- updates searches since the time that you had killed the process
@ihsanzainal84 an early christmas present for you.
Thanks again @georgecollier - do you know whether this disables the server actually trying to update the page (or just disabling the connection).
Now I just need to figure out how to disable auto-update for a hidden repeating group 
1 Like
I haven’t dug into it too much because it’s much easier to just use a custom state
It will block all realtime updates of searches, data changes etc. So you could see some unusual behaviour.
For instance, if you kill realtime, then update a title of a Thing in a search, then restore the realtime, the title won’t get retroactively updated (though searches will).
There’s a good chance it stops the ‘please refresh to continue using the app’ banner when you deploy, but you’ll find that workflows still error out so its not practical.
1 Like
@georgecollier - yea it’s a pretty niche requirement to be fair.
Will have a play around but it’s probably more trouble than it’s worth (until I find an easier method
)