# \[solved\] Agents.jl spending 3/4 of its time doing something before it even starts to compute?

**URL:** <https://discourse.julialang.org/t/solved-agents-jl-spending-3-4-of-its-time-doing-something-before-it-even-starts-to-compute/44109>\
**Category:** Performance\
**Created:** [August 1, 2020, 9:59pm UTC](https://discourse.julialang.org/t/solved-agents-jl-spending-3-4-of-its-time-doing-something-before-it-even-starts-to-compute/44109 "2020-08-01T21:59:26Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![dlakelan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dlakelan/32/8491_2.png) [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Post date:** [August 2, 2020, 10:00pm UTC](https://discourse.julialang.org/t/solved-agents-jl-spending-3-4-of-its-time-doing-something-before-it-even-starts-to-compute/44109/9 "2020-08-02T22:00:45Z")

</div>

Yeah, I don’t know either… Here’s two profile views one of which with 100 steps of my model one is 400:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/3/3/333c88836f5d20c4c0f16ed185fb5bd03286588a.png)

As you can see it doesn’t matter how long I run the thing it’s always something like 25 % of the samples are in my code.

Now that I think about it, I’ve got 4 julia threads in my environment variable, so maybe it’s sampling all 4 threads, and of course 3/4 of them are not doing anything, because I’m not using threads in my code.

That must be it?

---

_[View the full topic](https://discourse.julialang.org/t/solved-agents-jl-spending-3-4-of-its-time-doing-something-before-it-even-starts-to-compute/44109)._
