1
0

ChannelDB.load_data: add comment re bad performance, and some speed-up

On my machine, ChannelDB.load_data() went from around 6 sec to 4 sec,
just by commenting out that assert in lnmsg.

related #6006
This commit is contained in:
SomberNight
2020-03-03 04:04:30 +01:00
parent 4d6b0184b9
commit 99f736f3e7
2 changed files with 4 additions and 2 deletions

View File

@@ -581,6 +581,9 @@ class ChannelDB(SqlDB):
@sql
@profiler
def load_data(self):
# Note: this method takes several seconds... mostly due to lnmsg.decode_msg being slow.
# I believe lnmsg (and lightning.json) will need a rewrite anyway, so instead of tweaking
# load_data() here, that should be done. see #6006
c = self.conn.cursor()
c.execute("""SELECT * FROM address""")
for x in c: