-
Notifications
You must be signed in to change notification settings - Fork 3
Revert "Jp/first workers" #630
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,9 +14,8 @@ function StoreData(array: Array, valueScales?: {maxVal: number, minVal: number}) | |
| const [minVal,maxVal] = valueScales ? [valueScales.minVal, valueScales.maxVal] : ArrayMinMax(data ) | ||
| const textureData = new Uint8Array(data.length) | ||
| const range = (maxVal - minVal) | ||
| const multiplier = 1/range | ||
| for (let i = 0; i < data.length; i++){ | ||
| const normed = (data[i] - minVal) * multiplier; | ||
| const normed = (data[i] - minVal) / range; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change introduces a performance regression by moving the division operation inside the loop. In the previous version, a reciprocal multiplier ( |
||
| if (isNaN(normed)){ | ||
| textureData[i] = 255; | ||
| } else { | ||
|
|
||
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -12,8 +12,7 @@ export async function GetArray(varOveride?: string) { | |||||||
| const { idx4D, initStore, variable, setProgress, setStrides, setStatus } = useGlobalStore.getState(); | ||||||||
| const { compress, xSlice, ySlice, zSlice, coarsen, kernelSize, kernelDepth, fetchNC, setCurrentChunks, setArraySize } = useZarrStore.getState(); | ||||||||
| const { cache } = useCacheStore.getState(); | ||||||||
| const useNC = initStore.startsWith("local") && fetchNC // In case a user has NetCDF switched but then goes to a remote | ||||||||
| const fetcher = useNC ? NCFetcher() : zarrFetcher() | ||||||||
| const fetcher = fetchNC ? NCFetcher() : zarrFetcher() | ||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The removal of the
Suggested change
|
||||||||
| const targetVariable = varOveride ?? variable; | ||||||||
| const meta = await fetcher.getMetadata(targetVariable); | ||||||||
| const { shape, chunkShape, fillValue, dtype } = meta; | ||||||||
|
|
||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The indentation of the
HandleTimeSeriesfunction body is inconsistent with the rest of the file, using an excessive 8-space offset. This should be corrected to match the project's standard indentation (likely 2 spaces relative to the function declaration) to maintain readability.