[bisq-network/bisq] 100% CPU (constant high cpu) in v1.1.1 (#2856)

a123b notifications at github.com
Wed Jun 26 20:05:11 UTC 2019


I just tried attaching to Bisq in VisualVM just for fun. @thorie7912 here's how I did it:
- Start VisualVM and Bisq
- Select _Local_/_bisq.desktop.app.BisqAppMain_ in VisualVM
- Switch to the Profiler tab
- Replace the _Profile classes_ list on the right with `bisq.core.**`
- Add `,com.google.**, org.spongycastle.**` to the _Exclude outgoing calls_ list below
- Click the _Profile: CPU_ button and let it run for a few minutes
- Click the _Collected data: Snapshot_ button and then right click -> _Save As..._ the snapshot in the list on the left to export it

I attached the CPU profiler right after starting Bisq, before I entered the wallet password. After a while I switched to the BSQ wallet transactions list where the app eventually became completely unresponsive while using 100% CPU. I stopped the profiling then, but the app was still unresponsive. Then I decided to profile another minute of this hanging state.
Here are the saved snapshots: [bisq-cpu-profiling-snapshots-a123b.zip](https://github.com/bisq-network/bisq/files/3331664/bisq-cpu-profiling-snapshots-a123b.zip)

Some observations:
- Almost all of the time is spent in `DaoStateService.getTx(String)`.
- On startup, most of the `getTx` calls seem to come from `BondRepository.update()`, which was called 288 times in my case. I don't think this has anything to do with the issue, but it seems pretty inefficient.
- When the app starts to hang in the BSQ transaction list, it seems to call `BsqWalletService.getValueSentToMeForTransaction(Transaction)`, `BsqWalletService.getValueSentFromMeForTransaction(Transaction)` and `DaoFacade.hasTxBurntFee(String)` in an endless loop. Looking at the code, this seems to be in the constructor of `BsqTxListItem`. So the question would be why did the app get stuck creating `BsqTxListItem`s in an endless loop?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/issues/2856#issuecomment-506024660
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20190626/75c73fe6/attachment-0001.html>


More information about the bisq-github mailing list