CellChat icon indicating copy to clipboard operation
CellChat copied to clipboard

Question about CellChat (v2) processing/run time.

Open jzheng25 opened this issue 8 months ago • 4 comments

Dear Team,

Thank you for developing this great tools. I have some observations on the CellChat v2 runtime.

  • computation config: 4 libraries, 10k-15k cells with 20ish cell types.
  • trunctMean with 0.1 trim; nboot = 200

Below is the processing time for EACH library in different config.

  • R studio on Windows: 2-3 hours without multisession; much more slower with multisession
  • Rstudio server on WSL: 2-3 hours without multisession;
  • R (terminal) on WSL: only 30 minutes without multisession; very slow with multisession.

Look like R terminal in Linux is very fast even with harsh setting (trunctMean and higher nboot). Do you have any ideas on why it happens? My R version is 4.5.0 on WSL.

jzheng25 avatar May 21 '25 00:05 jzheng25

I have the same issue running the dataset from the tutorial.

https://htmlpreview.github.io/?https://github.com/jinworks/CellChat/blob/master/tutorial/CellChat-vignette.html

Without future::plan("multisession", workers = 4)

these two lines of code

cellchat <- identifyOverExpressedGenes(cellchat)
cellchat <- identifyOverExpressedInteractions(cellchat)

take 0.920 seconds.

With future::plan("multisession", workers = 8)

it is extremely slow. Takes 367.690 seconds.

So ~400X slower.

I'm running R on Ubuntu.

felixm3 avatar Jun 25 '25 19:06 felixm3

I have the same problem, always slower with "multisession" so I stop using it

Rayan21100 avatar Jul 15 '25 15:07 Rayan21100

Same here, The speed is 1000 times faster without the multisession future::plan("multisession", workers = 32)

ChenlingTangMDA avatar Jul 16 '25 20:07 ChenlingTangMDA

I came across the same problem after updating the future package, so I downgraded the future package back to version 1.34 and solved the problem

wuliRothschild avatar Jul 28 '25 02:07 wuliRothschild