SolidOS / solidos

The operating system for Solid
https://solidos.solidcommunity.net/
MIT License
127 stars 19 forks source link

Check for memory leaks in SolidOS in general #122

Open timbl opened 2 years ago

timbl commented 2 years ago

Nolan Lawson blog reminds us that memory leaks can slow things down if they build up. I wonder whether many of the problems he mentioned, like adding an event listened and not removing it, are in fact cleared up when the DOM which was the target of the listening is itself cleared up. I hope so!

This is just a placeholder issue reminds us to look at memory leaks n SolidOS, decide whether we need t more about them.

timea-solid commented 2 years ago

I am sure you mean this warning message we see in the console:

MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 sessionRestore listeners added. Use emitter.setMaxListeners() to increase limit
    d https://timea.solidcommunity.net/mashlib.min.js:127
    addListener https://timea.solidcommunity.net/mashlib.min.js:127
    onSessionRestore https://timea.solidcommunity.net/mashlib.min.js:100
    e https://timea.solidcommunity.net/mashlib.min.js:52
    l https://timea.solidcommunity.net/mashlib.min.js:100
    _invoke https://timea.solidcommunity.net/mashlib.min.js:100
    y https://timea.solidcommunity.net/mashlib.min.js:100
    n https://timea.solidcommunity.net/mashlib.min.js:8
    s https://timea.solidcommunity.net/mashlib.min.js:8
    exports https://timea.solidcommunity.net/mashlib.min.js:8
    exports https://timea.solidcommunity.net/mashlib.min.js:8
    W https://timea.solidcommunity.net/mashlib.min.js:52
    _ https://timea.solidcommunity.net/mashlib.min.js:52
    _ https://timea.solidcommunity.net/mashlib.min.js:52
    e https://timea.solidcommunity.net/mashlib.min.js:52
    l https://timea.solidcommunity.net/mashlib.min.js:100
    _invoke https://timea.solidcommunity.net/mashlib.min.js:100
    y https://timea.solidcommunity.net/mashlib.min.js:100
    n https://timea.solidcommunity.net/mashlib.min.js:8
    s https://timea.solidcommunity.net/mashlib.min.js:8
    exports https://timea.solidcommunity.net/mashlib.min.js:8
    exports https://timea.solidcommunity.net/mashlib.min.js:8
    S https://timea.solidcommunity.net/mashlib.min.js:52
    e https://timea.solidcommunity.net/mashlib.min.js:52
    l https://timea.solidcommunity.net/mashlib.min.js:100
    _invoke https://timea.solidcommunity.net/mashlib.min.js:100
    y https://timea.solidcommunity.net/mashlib.min.js:100
    n https://timea.solidcommunity.net/mashlib.min.js:8
    s https://timea.solidcommunity.net/mashlib.min.js:8
    exports https://timea.solidcommunity.net/mashlib.min.js:8
    exports https://timea.solidcommunity.net/mashlib.min.js:8
    T https://timea.solidcommunity.net/mashlib.min.js:52
    e https://timea.solidcommunity.net/mashlib.min.js:52
    l https://timea.solidcommunity.net/mashlib.min.js:100
    _invoke https://timea.solidcommunity.net/mashlib.min.js:100
    y https://timea.solidcommunity.net/mashlib.min.js:100
    n https://timea.solidcommunity.net/mashlib.min.js:8
    s https://timea.solidcommunity.net/mashlib.min.js:8
    exports https://timea.solidcommunity.net/mashlib.min.js:8
    exports https://timea.solidcommunity.net/mashlib.min.js:8
    G https://timea.solidcommunity.net/mashlib.min.js:52
    e https://timea.solidcommunity.net/mashlib.min.js:52
    l https://timea.solidcommunity.net/mashlib.min.js:100
    _invoke https://timea.solidcommunity.net/mashlib.min.js:100
    y https://timea.solidcommunity.net/mashlib.min.js:100
    n https://timea.solidcommunity.net/mashlib.min.js:8
    s https://timea.solidcommunity.net/mashlib.min.js:8
    exports https://timea.solidcommunity.net/mashlib.min.js:8
    exports https://timea.solidcommunity.net/mashlib.min.js:8
    filterAvailablePanes https://timea.solidcommunity.net/mashlib.min.js:52
    render https://timea.solidcommunity.net/mashlib.min.js:172
    propertyTable https://timea.solidcommunity.net/mashlib.min.js:140
    promise callback*t.default/this.propertyTable https://timea.solidcommunity.net/mashlib.min.js:140
    d https://timea.solidcommunity.net/mashlib.min.js:140
    f https://timea.solidcommunity.net/mashlib.min.js:140
    fireCallbacks https://timea.solidcommunity.net/mashlib.min.js:1
    value https://timea.solidcommunity.net/mashlib.min.js:50
    value https://timea.solidcommunity.net/mashlib.min.js:50
    value https://timea.solidcommunity.net/mashlib.min.js:50
    value https://timea.solidcommunity.net/mashlib.min.js:50
    promise callback*value https://timea.solidcommunity.net/mashlib.min.js:50
    value https://timea.solidcommunity.net/mashlib.min.js:50
    promise callback*value https://timea.solidcommunity.net/mashlib.min.js:50
    value https://timea.solidcommunity.net/mashlib.min.js:50
    value https://timea.solidcommunity.net/mashlib.min.js:50
    value https://timea.solidcommunity.net/mashlib.min.js:50
    Y https://timea.solidcommunity.net/mashlib.min.js:140
    GotoSubject https://timea.solidcommunity.net/mashlib.min.js:140
    l https://timea.solidcommunity.net/mashlib.min.js:140
    F https://timea.solidcommunity.net/mashlib.min.js:140
    F https://timea.solidcommunity.net/mashlib.min.js:140
    N https://timea.solidcommunity.net/mashlib.min.js:140
    tabWidget https://timea.solidcommunity.net/mashlib.min.js:140
    e https://timea.solidcommunity.net/mashlib.min.js:140
    l https://timea.solidcommunity.net/mashlib.min.js:100
    _invoke https://timea.solidcommunity.net/mashlib.min.js:100
    y https://timea.solidcommunity.net/mashlib.min.js:100
    v https://timea.solidcommunity.net/mashlib.min.js:140
    o https://timea.solidcommunity.net/mashlib.min.js:140
    promise callback*v https://timea.solidcommunity.net/mashlib.min.js:140
    o https://timea.solidcommunity.net/mashlib.min.js:140
    y https://timea.solidcommunity.net/mashlib.min.js:140
    y https://timea.solidcommunity.net/mashlib.min.js:140
    w https://timea.solidcommunity.net/mashlib.min.js:140
    b https://timea.solidcommunity.net/mashlib.min.js:140
    e https://timea.solidcommunity.net/mashlib.min.js:140
    l https://timea.solidcommunity.net/mashlib.min.js:100
    _invoke https://timea.solidcommunity.net/mashlib.min.js:100
    y https://timea.solidcommunity.net/mashlib.min.js:100
    v https://timea.solidcommunity.net/mashlib.min.js:140
    o https://timea.solidcommunity.net/mashlib.min.js:140
    y https://timea.solidcommunity.net/mashlib.min.js:140
    y https://timea.solidcommunity.net/mashlib.min.js:140
    E https://timea.solidcommunity.net/mashlib.min.js:140
    showDashboard https://timea.solidcommunity.net/mashlib.min.js:140
    e https://timea.solidcommunity.net/mashlib.min.js:172
    l https://timea.solidcommunity.net/mashlib.min.js:100
    _invoke https://timea.solidcommunity.net/mashlib.min.js:100
    y https://timea.solidcommunity.net/mashlib.min.js:100
    i https://timea.solidcommunity.net/mashlib.min.js:172
[mashlib.min.js:127:4659](https://timea.solidcommunity.net/mashlib.min.js)