You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like persistentIds just grows with each push notification received. And each time you get a message, it's parsing out the whole list from config, creating a new array with an additional element, then re-saving it back to config. That seems like after a lot of notifications could get very slow.
Do we really need to keep every single one around?
This code in push-receiver seems to be resetting its local copy of persistentIds on a login event, and it's trying to log in every time we connect. Perhaps the right thing would be clear the persistentIds from config after a successful listen() call?
The text was updated successfully, but these errors were encountered:
The core library allows you to give it a list of persistent IDs to ignore on connect, but it does not store its own local copy of them.
The calling code adds the persistent IDs to a SQLite table as the messages come in. On connect, it supplies the persistent IDs and clears the SQLite table on a successful connect.
Looking at this code: https://github.com/MatthieuLemoine/electron-push-receiver/blob/master/src/index.js
It looks like persistentIds just grows with each push notification received. And each time you get a message, it's parsing out the whole list from config, creating a new array with an additional element, then re-saving it back to config. That seems like after a lot of notifications could get very slow.
Do we really need to keep every single one around?
This code in push-receiver seems to be resetting its local copy of persistentIds on a login event, and it's trying to log in every time we connect. Perhaps the right thing would be clear the persistentIds from config after a successful
listen()
call?The text was updated successfully, but these errors were encountered: