Skip to content

Batching lots of labels at once in "force upload" mode is slowwwww #3

@cculianu

Description

@cculianu

Hi,

We over at Electron Cash are thinking of resurrecting this labelsync functionality which has been dormant in EC for some time.

We set up a test server and are testing the server out (using bauerj's fork which doesn't differ so much from this codebase). So far so good!

One thing I've noticed: server-side performance seems a bit slow when uploading lots of labels (say 700+ from 1 wallet in 1 batch). The client side takes forever to get a response from the server and it times out often, giving the user the impression the upload failed.

In reality if you come back to the server later it seems it "gets the labels" eventually.

I went into the code and it seems in sync_master.go that the server is doing a round-trip to the DB for each label received. I'm wondering if this is the source of the bottleneck.

it looks like the server side eventually completes though -- which is consistent with observation.

Is there any chance that loop can be rewritten to perhaps be more performant on large upload batches? Perhaps not go round-trip to the DB for each label but use some other strategy (such as batched updates to the DB?).

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions