# Massive and reproducible slowdown (git425255a5)

**URL:** <https://discourse.cataclysmdda.org/t/massive-and-reproducible-slowdown-git425255a5/26053>\
**Category:** The Garage\
**Created:** [March 8, 2021, 9:51pm UTC](https://discourse.cataclysmdda.org/t/massive-and-reproducible-slowdown-git425255a5/26053 "2021-03-08T21:51:01Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Valase](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/valase/32/6972_2.png) [@Valase](https://discourse.cataclysmdda.org/u/Valase)\
**Post date:** [March 9, 2021, 3:08pm UTC](https://discourse.cataclysmdda.org/t/massive-and-reproducible-slowdown-git425255a5/26053/7 "2021-03-09T15:08:43Z")

</div>

> [@ThinkSome](#):
>
> I’ve kept that account for work on proprietary software/paid software work […]

Still seems a bit weird to me…

> [@ThinkSome](#):
>
> In this version, the ‘m’ advanced inventory key copies instead of moving.

Known bug, see:

> [@Bug: Moving items using (m) causes the game to multiply the items in some cases](https://discourse.cataclysmdda.org/t/bug-moving-items-using-m-causes-the-game-to-multiply-the-items-in-some-cases/26032):
>
> Easy to replicate: Build 11508 Mods: Dark Days Ahead Disable NPC Needs Bionic Professions No Rail Stations No Fungal Monsters SpeedyDex Stats Through Kills Stats Through Skills Create a test world Spawn any item that has “multiples” under ( ) in front of the name (Ammo, some foods, some drugs, cotton sheet and other spare parts that work the same way) place them on the floor anywhere and open the “/” menu. use “m” to move an amount of them from one space to …

and it was fixed already:

> <https://github.com/CleverRaven/Cataclysm-DDA/pull/47885>
>
> \#### Summary
> Bugfixes "AIM item duplication"
> 
> \#### Purpose of change
> 
> A pre…vious pr of mine (#47796) caused a bug that duplicated items in certain cases.
> (When moving partial stacks via AIM, with both destination and target location being floor tiles)
> 
> Fixes #47884
> 
> \#### Describe the solution
> 
> \- My stolen items pr turned a reference into a copy ... reverted this change to the original code.
> \- Instead now the check for item ownership is moved up before any charge/stack count manipulation could happen.
> 
> This should prevent the duplication issue and still prevent the player from moving/hauling stolen goods without picking them up first. (and prevent the original crash) 
> 
> \#### Testing
> 
> \- Spawn in a bunch of ammo
> \- Get into AIM and move a portion of that amo stack from one floor tile to another
> \- The total amount of ammo should remain the same (no duplication)
> 
> Stolen flag handling
> \- Download linked save in issue #47726
> \- Try to move the item stack with stolen flags (!) either via AIM or the hauling action
> \- Examine the items
> \- Should not crash and the items that aren't owned by the player should still be in the same tile they originally were (not moved)

---

_[View the full topic](https://discourse.cataclysmdda.org/t/massive-and-reproducible-slowdown-git425255a5/26053)._
