getappmap / appmap-intellij-plugin

MIT License
37 stars 8 forks source link

Performance issues #754

Closed Daniel-Warner-X closed 1 month ago

Daniel-Warner-X commented 1 month ago

Overview

Working with the AppMap plugin for IntelliJ to map and query Navie about Waltz has been a struggle from a performance perspective. My system fan is constantly on and the performance of my system overall has been sluggish while running intelliJ. In some cases it caused a CPU throttling that prevented me from performing basic UI tasks such as scrolling and typing in the Navie web view.

Shutting down all running apps except for IntelliJ and Slack didn't help.

I don't know if it's entirely an AppMap issue, but the scanner and appmap processes are always topping the list in activity monitor. I can't run any other apps while I have IntelliJ open and it's still very slow.

For the purposes of this bug report I methodically I 'started from scratch' rebuilding my dev environment for Waltz. While the performance issues did not reach the level of throttling that affects the UI, the underlaying performance issue was reproducible with the AppMap data on this branch: https://github.com/land-of-apps/waltz/tree/demo/diagrams-general.

It seems to have something to do with the amount of AppMap data. In rebuilding my environment things started out smoothly. I created ~300 new AppMap data files and things remained smooth. The fan started and the AppMap processes still topped the Activity monitor but it did not affect usability at all.

I deleted those maps and loaded AppMap data from the demo branch. I gave IntelliJ/AppMap a bit of time to scan the files, but eventually performance started to climb to worrying levels. And the UI started to feel sluggish in terms of rendering windows and responsiveness. I will continue to work with IntelliJ until I see the throttling happen and will update this issue when it does.

I also realized that even though I 'updated' my AppMap plug-in I am pinned on version .67.2 because I am using CE 2023. As you can see below it had my AppMap extension listed as both 'installed' and 'uninstalled'. I will switch to CE 2024 and update this issue.

My environment

Screenshot 2024-07-31 at 12 04 14 PM

Screenshot 2024-07-31 at 12 05 21 PM

image

Video capture

  1. Starting up: Opening a project with no AppMap data, IntelliJ already runs hot. That is probably to be expected, and it doesn't seem to affect Navie performance at all.

https://www.loom.com/share/7b0f097f7b56464ea82210f306134418?sid=73cbf009-db92-446d-8353-31053e56666f

  1. I created new AppMap data to work with via the typical request recording of the dev server. The AppMap processes and IntelliJ processes are hot, causing the fan to blow, but the UI is still usable.

https://www.loom.com/share/f1f165476c704e1abe6ac7d9045699f6?sid=a7d0782f-5139-4643-a6b8-ccbcb2e1a08e

  1. Switching branches causes IntelliJ to run wild, but Navie still works.

https://www.loom.com/share/beee9f5175aa440c89e6d0b536c96534?sid=5ea93240-fd04-4482-a87c-bad65e79824e

  1. Moving uncompressed AppMap Archive (1.4G) via IntelliJ locked up the IntelliJ UI for ~15mins.

https://www.loom.com/share/9f4b7013bd124192adef674cf49c90eb?sid=a6e5b9b1-9485-4b42-9cd7-39a2f7d298e0

  1. Working with the demo data starting cause sluggishness. System not throttled at this point. Navie still working.

https://www.loom.com/share/c876088056d443d2b5151572084c9bc6?sid=b0655449-9498-4947-a05d-567e13309e12

  1. As I continue to use Navie the experience starts to degrade slightly with delays in rendering windows and UI responsiveness. Still not throttled to the point I experienced yesterday but definitely a noticeable drop off in UI responsiveness. Note at the beginning of the video I have to 'reopen

https://www.loom.com/share/274edb9086da4bde8b30ce86c2cc0b7f?sid=e04a367a-9ff3-40ce-8515-459f38a58a04

After documenting the steps above, I let things sit idle for ~30mins. The fan continues to blow, and the IntelliJ and AppMap processes still run hot.

image

Sitting idle for an hour it still continues to pull CPU. I have to shut it down to start working in other applications.

Screenshot 2024-07-31 at 2 24 37 PM

dustinbyrne commented 1 month ago

Scanner should be disabled by default. Have you turned it on in the plugin settings (Settings > Tools > AppMap)? Not that this would fix the issue, but it'd certainly help to not have another process polling the file system.

appland-release commented 1 month ago

:tada: This issue has been resolved in version 0.73.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: