Browser lockup when using reactive remote function with LayerChart
### Describe the bug
When using a reactive remote function, for example:
```js
const data = $derived(await getData(days));
```
and trigger a change (`days`) will cause the browser to freeze/lockup.
This same code works if you switch to client-side synchronous data, for example:
```js
const data = $derived(generate(days));
```
This was first reported as a LayerChart [issue](https://github.com/techniq/layerchart/issues/895) but I'm unable to find any cause and looks like a potential svelte async scheduling issue.
### Reproduction
[repo](https://github.com/techniq/layerchart-async-repro) (notable this [route](https://github.com/techniq/layerchart-async-repro/blob/main/src/routes/remote/%2Bpage.svelte))
```svelte
<script>
import { BarChart } from "layerchart";
import { getData } from "../data.remote";
let days = $state(30);
const data = $derived(await getData(days));
</script>
<h1>remote function (async)</h1>
<button onclick={() => (days = days === 30 ? 90 : 30)}>range: {days}d</button>
<BarChart
data={data.rows}
x="day"
series={[
{ key: "a", color: "tomato" },
{ key: "b", color: "steelblue" },
]}
seriesLayout="stack"
bandPadding={0.2}
height={300}
/>
```
### Logs
```shell
```
### System Info
```shell
svelte `5.56.8` (also tried `5.55.10`)
```
### Severity
blocking an upgrade
0 条评论