jacob-long / panelr

Regression models and utilities for repeated measures and panel data
Other
99 stars 21 forks source link

long_panel suddenly got super slow #51

Open tci1 opened 1 year ago

tci1 commented 1 year ago

I'd been using the long_panel function on a couple datasets just fine. I had to do some updates (packages, RStudio, R). When I run long_panel in the 'panelr' package now it suddenly takes a really long time. Like what took 1-2 minutes before is not taking >17 minutes. It just runs and runs and won't finish. I have to hit Esc. Any suggestions?

jacob-long commented 1 year ago

I'm experiencing the same thing. Investigating now...

jacob-long commented 1 year ago

After spending too much time looking into this, in my tests the part of the function that takes almost all of the runtime is deeply nested inside a tidyverse function. After looking at some of my old notes, I'm no longer confident that it has gotten slower on the package's own examples, which is all I have to work with for now.

If I find another example with a different bottleneck, I will revisit. I'm also considering giving the user better options to opt out of the slow part of the function if they know enough about their data to avoid needing that part.

tci1 commented 1 year ago

Thanks for the update. The options to opt out of a part sound nice.

Thanks for a great package! There's so much to love about it!

On Thu, Jan 12, 2023 at 7:33 AM Jacob Long @.***> wrote:

After spending too much time looking into this, in my tests the part of the function that takes almost all of the runtime is deeply nested inside a tidyverse function. After looking at some of my old notes, I'm no longer confident that it has gotten slower on the package's own examples, which is all I have to work with for now.

If I find another example with a different bottleneck, I will revisit. I'm also considering giving the user better options to opt out of the slow part of the function if they know enough about their data to avoid needing that part.

— Reply to this email directly, view it on GitHub https://github.com/jacob-long/panelr/issues/51#issuecomment-1380363309, or unsubscribe https://github.com/notifications/unsubscribe-auth/A427LQN4P7ULSHW4NMSPMMDWSABZTANCNFSM6AAAAAATCU3FS4 . You are receiving this because you authored the thread.Message ID: @.***>