The in-memory workspace is a dedicated “scratch” workspace for ArcGIS where geoprocessing outputs can be written. This includes processes run via ArcMap, Model Builder, and Python. Writing data to the in-memory workspace can save heaps of time when compared to writing to disk, especially for long-running applications that involve many steps or iterations. I recently developed an ArcGIS script tool that creates separate OD cost matrix tables for over 500 origin locations and produces a raster allocation surface of results within a study area around each location. When writing the temporary data to a disk location, each origin location analysis required about 72 minutes to complete. With over 500 origins, I could anticipate this would take about 600 hours total to complete (about 25 days). When I switched to using the in-memory workspace, this process was cut down to 6 minutes per origin location (about 50 hours total).
That saves about 23 days of processing time!
Click here to learn more about using the in_memory workspace.