# Summary method slow for large models

**URL:** <https://discourse.mc-stan.org/t/summary-method-slow-for-large-models/18147>\
**Category:** General\
**Created:** [September 23, 2020, 2:56am UTC](https://discourse.mc-stan.org/t/summary-method-slow-for-large-models/18147 "2020-09-23T02:56:00Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![zcai](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/zcai/32/10242_2.png) [@zcai](https://discourse.mc-stan.org/u/zcai)\
**Post date:** [May 31, 2021, 12:13am UTC](https://discourse.mc-stan.org/t/summary-method-slow-for-large-models/18147/13 "2021-05-31T00:13:27Z")

</div>

Thanks and nice recommendation. Here is what I tried, reduced draw time from 50s (model only took 23s to fit with 4 chians,1000 warm up and 1000 samples) to 3s, if I just use `fit$draws`

```
        cmdstanfiles <- list()
        for (f in fit$output_files()) {
          cmdstanfiles[[f]] <- fread(cmd= paste0("grep -v '^#' ", f))
        }
        var_of_interest <- cmdstanfiles %>% bind_rows() %>% dplyr::select(starts_with("var_of_interest")) %>% as.matrix()

```

---

_[View the full topic](https://discourse.mc-stan.org/t/summary-method-slow-for-large-models/18147)._
