web3swift
web3swift copied to clipboard
Creating a new wallet is too slow
macos Version :12.3
xcode Version : 13.3
cocospod Version:1.11.3
Installing BigInt (5.2.0)
Installing CryptoSwift (1.4.3)
Installing PromiseKit (6.15.3)
Installing Starscream (4.0.4)
Installing secp256k1.c (0.1.2)
Installing web3swift (2.6.0)
Creating a new wallet is too slow, 5 seconds to print information
Get private key is too slow,5 seconds to print information The speed of creating wallet in web3swift version 2.3.0 is normal
This has been on my radar for a while. Now that EIP-1559 support is out I'll start looking into it now.
What hardware are you building/testing on? Also can you try building in release mode to see if this solves the problem?
你正在制造/测试什么硬件?
iphone6 plus
Can you please build your code in "release" mode, and report back if the issue is still present then?
Please let me know if this exist in Real device as well
I can confirm that the issue lies between debug and release builds. I created a simple test app to create a private key.
Debug Build/Run: 7.790989995002747
Release Build/Run: 0.10214793682098389
The issue is also exclusively when building via SPM, as SPM builds everything from source, using the app's build settings. XCode projects include the libraries as frameworks, which are built separately in release mode, so even a debug app, does not see the same performance hit.
This not really an issue as it affects debugging only, and there is nothing we can really do about it. This is a known issue with CryptoSwift, you can follow the link posted in #535 if you want to know more.
This issue should probably be closed at this point.