slow type inference #3167
Unanswered
maxandron
asked this question in
Idea / Feature Request
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Check existing issues
Viem Version
2.21.55
Current Behavior
Hello.
I'm trying to POC migrating from ethers to viem in our code base. Loving viem so far but experiencing a significant degradation in typescript's performance. Especially when using extend and even more so if inferring multiple chains when creating the client.
I saw a closed issue that was opened in May on the matter. (#2322)
Is there anything I can try to improve the performance?
Expected Behavior
Blazingly fast type inference :D
Steps To Reproduce
create a client with a union of networks and extend it. Then see that every completion takes 1-2s
Link to Minimal Reproducible Example
https://www.typescriptlang.org/play/#code/JYWwDg9gTgLgBAbzgYygUwIYzQBQK4BGANsMgMIloB2MANHABYwxj0DuGRRaMAgsjGAQqAZzgBfOADMoEEHADkAN2BoQCgNwAoUJFiI4YQiWT9BwkQBkATBOmz5y1SAD0EMAFoRMDMgDWCjrg0PAAVHAYYsgMGMCi9nKKKmou0bGimlpaUnhUAkJUcADmPGQxcQAUAJSIWnBwLi5wACoMaHAg0O1pcWIAkhEAJoOMaOhwMG1wbNAi7cDwBGjIcmgidXAibAvRcBVgsshrIgB01EonVDwzUH41CBv1yJHtCgQvCgBcj-Vw6DB4KCFHqiE7vObaX4oF6KAgiZBfH71f6A4HlUFw5CQ37POaKI5ECCIqHIniolDo04EiDYp4whQkK4YYkklFAinpU6MzC06F4t5ESIwFlQtlozlgwXeXm415GIhzEW-MUc3oneVzEEy+lSDA0ORK0kA9kg066-UgbX8+GyLiGv5kk2Uk42iBcK2vEB6mDce0q00nL00bgexRFKgQETAER+x3itXhyPR0MKDBQAgLKB4dTfEkO43x0FpjMwLOWn6yxTuQQgaM5pH58kB6ugOspjBKTh66JoWMF1VFzuCvJtXmDNC6vBEGC5kmTWRsOBXRcAUSgsigFQARLkRHgwHpsCMrjAbn4t1VseItNetCtRPBkJQaHAALwodBYXDGUgUVQ0CoHiedFPmKUp0WqWgNlLPUREPUCmBYSCbyqDYzgAD2wKhBgqDguB4MwChEVD6gwrCcKMYhSEIiwbGqS8skaOAAGUfH0GAAE8wDiIo4AAAyff8YBOPi4BOcSImwiYoA4uA8CjKheL1WScjycxCm2SYIigIpTi0IA
Anything else?
No response
Beta Was this translation helpful? Give feedback.
All reactions