Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure that extra buckets and fallback buckets are loaded with lower priority #2724

Merged
merged 2 commits into from
Jun 21, 2018

Conversation

philippotto
Copy link
Member

@philippotto philippotto commented Jun 11, 2018

Mailable description of changes:

  • Improve loading speed of buckets

URL of deployed dev instance (used for testing):

Steps to test:

  • view dataset

Issues:


  • Ready for review

  • Waiting for lab approval

const bucketAddress = ((topLeftBucket.slice(): any): Vector4);
bucketAddress[u] = x;
bucketAddress[v] = y;
bucketAddress[w] += wSliceOffset;

const bucket = binary.cube.getOrCreateBucket(bucketAddress);
const isExtraBucket =
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't think of a more elegant way to express the logic for the "extra" bucket (better naming needed, too ^^).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about simply using the Chebyshev distance instead of the manhattan distance to assign priorities for the priority queue? I feel like this would reduce complexity and avoid the need to take special care of the "extra" buckets :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would indeed solve the problem. However, we would change the loading behavior (from the user's point of view) quite a bit 🤔 Not sure whether that's ok..

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't remember what the conclusion of our discussion about this yesterday was 🙈

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we said that the priority here doesn't really matter as the ping strategy takes precedence, anyway. However, it's good to leave this edge case in the code because the code might make the ping strategy obsolete at some point (and then it's important). I wouldn't switch to chebyshev without having the approval from the lab..

@philippotto philippotto changed the title Ensure that extra buckets and fallback buckets are loaded with lower priority [Blocked] Ensure that extra buckets and fallback buckets are loaded with lower priority Jun 13, 2018
@philippotto philippotto changed the title [Blocked] Ensure that extra buckets and fallback buckets are loaded with lower priority Ensure that extra buckets and fallback buckets are loaded with lower priority Jun 21, 2018
@philippotto philippotto merged commit 034eb53 into master Jun 21, 2018
@philippotto philippotto deleted the bucket-loading-speed-test branch June 27, 2018 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants