Skip to content

More options for inserting based on siteId #2

Open
@trepidacious

Description

@trepidacious

I was just looking at the case for inserting an identifier at the same position as the previous identifier, but with a greater site id:

      } else if (diff === 1 && siteID > prevSiteID) {
        return [[prevInt, siteID]];

This makes sense, but is there not also a similar case:

      } else if (diff === 1 && siteID < nextSiteID) {
        return [[nextInt, siteID]];

And a final case (which would actually have to come first in the conditional):

      } else if (diff === 0 && siteId > prevSiteId && siteID < nextSiteID) {
        return [[nextInt, siteID]]; // Or equivalently use prevInt

Do these all actually make sense? If the existing case works, I can't see why the new ones wouldn't.

Practically I don't know whether these will actually come up that often - in the original logoot paper I don't think any of these options are deliberately used on an individual site, but they could still happen from concurrency so I can't see any harm in using them except performance. Actually the algorithm in the original logoot paper doesn't seem to work because of an off by one error and a more important logical problem with generating the line positions (as far as I can tell!).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions