Skip to content

Using Objects instead of jshashtable? #3

Closed

Description

@tmcw

It'd definitely be possible to use a simple object-literal in place of jshashtable - I can definitely run this work out if there's no other-reason for using it that I'm not aware of.

Activity

  1. systemed commented on Oct 14, 2012

    @systemed
    Contributor

    I think the reason for using a hash table is that an Object is keyed on .toString() - which by default is entityType+"."+id, so node.36.

    That's ok for most uses, but ids get renumbered on upload - we go from arbitrary negative ids to server-generated positive ids. So if a node had .parents["way.-5"]=true, then this breaks after upload, because that should now be "way.1239867".

    But if I've got this wrong (entirely possible) or there's a better way of doing it, then go ahead and convert it. :)

  2. tmcw commented on Oct 17, 2012

    @tmcw
    ContributorAuthor

    This is addressed in #8, which adds internal IDs for keeping object identity, so we can use a simple object.

  3. tmcw commented on Oct 19, 2012

    @tmcw
    ContributorAuthor

    Done in the merge.

  4. added a commit that references this issue on Feb 17, 2016
  5. added a commit that references this issue on Apr 20, 2020
  6. added a commit that references this issue on Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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