Hello, so I've been learning to use R Studio and the lidR package. Things were going well up until the end of last week when every instance of my code that I execute using the package begins to run impossibly slow. Commands are taking up to 5x as long now when I made no real changes to my code. Currently I'm running version 1.4.1106. I tried reinstalling it to no avail. One thing I noticed in my task manager is that somethings my memory usage bumps up to 97%. I am betting this is the problem though I don't have an explanation as to why my memory usage would suddenly bump and cause programs to slow.
library(lidR)
las <- readLAS("C://Users//Owner//Documents//lidar//pcloud//Petrolia.las")
nlas <- normalize_height(las, tin())
chm <- grid_canopy(nlas, 0.4, pitfree(subcircle = 0.2, threshold = c(0, 10, 20), max_edge = c(0, 1.5)))
ttops <- find_trees(chm, lmf(ws=30))
plot(chm)
plot(ttops, add = TRUE)