Problem with plotting large time series data sets with GLMakie


I am plotting large time series data sets with GLMakie. In some cases I get a time out from my graphics driver. Then the plotting fails and sometimes julia freezes or crashes. I use the integrated graphics of my CPU (AMD 7950X). I checked the memory usage. The small dedicated memory of the graphics unit is used up but there is plenty of shared memory (system RAM) available. I managed to reduce the problem to the following example:

using GLMakie

# data generation
num_data_points = 10000000
num_periods = 1000000
time = LinRange(0.0, 2 * π * num_periods, num_data_points)
signal = sin.(time)

# plotting
fig = Figure()
ax = Axis(fig[1,1])
lines!(ax, time, signal)

It is interesting that the number of periods and not the number of data points appears to be the problem. Is there a way to fix this without down sampling below the oscillation period? Is this a device specific problem or a problem of GLMakie?

I figured it out. Windows prompts the graphics card every 2 seconds. If a task takes longer than 2 seconds, windows thinks there is a problem and resets the graphics card (killing the task). This is what happend on my computer with the above code example. I solved the problem by increasing the time interval between prompts in the registry (Timeout detection and recovery (TDR) - Windows drivers | Microsoft Learn). I hope this thread helps those who run into the same issue.