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

Remove threads.js #160

Merged
merged 8 commits into from
Apr 23, 2020
Merged

Remove threads.js #160

merged 8 commits into from
Apr 23, 2020

Conversation

ilan-gold
Copy link
Collaborator

@ilan-gold ilan-gold commented Apr 23, 2020

GeoTIFF recently ventured into threads.js which made bundling this application very difficult unless we tell upstream users to carry a plugin, which I think is not ideal.

We now re-use the old WebWorker code from GeoTIFF that they had and bundle it directly as an inline web worker. I'll open an issue with them to see if they want to go back to this.

This also inadvertently fixes #97 . See andywer/threads.js#211 for someone experiencing a similar issue and andywer/threads.js#232 (comment) for the GeoTIFF contributor getting feedback.

@ilan-gold ilan-gold requested a review from manzt April 23, 2020 17:42
Copy link
Member

@manzt manzt left a comment

Choose a reason for hiding this comment

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

Looks good. I'm glad you figured out the webpack magic for importing workers.

@@ -1,6 +1,7 @@
import { openArray } from 'zarr';
// eslint-disable-next-line import/extensions
Copy link
Member

Choose a reason for hiding this comment

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

is this eslint vestigial?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Probably.

function decode(self, fileDirectory, buffer) {
const decoder = getTiffDecoder(fileDirectory);
const result = decoder.decode(fileDirectory, buffer);
self.postMessage([result], [result]);
Copy link
Member

Choose a reason for hiding this comment

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

is result an ArrayBuffer?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes.

@ilan-gold ilan-gold merged commit 9eba920 into master Apr 23, 2020
@ilan-gold ilan-gold deleted the ilan-gold/move_off_threads branch April 23, 2020 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Look into unifying build systems
2 participants