I find that the browser based solidity compiler will crush when the code's length reach certain value which is about 230 lines. I don't know why and I am certain that there is no syntax mistake, does this problem ever happen to you?
4 Answers
Compiling code takes a lot of computing power, especially when you recompile every time you edit. There's simply a limit to how much you can do within a browser.
If you're writing a lot of code, I would highly reccomend utilizing a framework or command-line compiler
- 37,046
- 10
- 91
- 118
-
you mean the mix? – Wang May 13 '16 at 04:36
-
when I deploy it using the mist, the mist also crushes – Wang May 13 '16 at 05:25
Did you tried in CLI environment?
solc --bin --abi yourcode.sol
and check the result first.
--- install CLI Ethereum In case of MIST, they already have geth I think 230 lines code is not a problem. Because there's more than 230 code is existing. So, first you try compile in command line.
you can download CLI ethereum package https://build.ethereum.org/cpp-binaries-data/release-1.2.2/Ethereum.exe
- 155
- 4
-
the only way I can to deploy the contract is using mist, can you teach me how to do this? – Wang May 13 '16 at 10:05
-
Javascript solc was automatically generated from c++ code which makes it wildly inefficient.
The solc compiler is extremely slow. A few hundred lines will begin to take over a minute to compile. For comparison, the solc package included in cpp-ethereum takes about 1 second.
I believe that the Javascript solc package was actually automatically generated from the solc implementation in c++ (possibly using something like this). You can actually view the JS source here. As you can see, the JS compiler is insanely complex and likely extremely inefficient. If you are a compiler guru it would be a great service the community if you would rewrite this JS compiler.
- 1,691
- 3
- 19
- 24
Have you tried Ethereum Studio on live.ether.camp as a full functional web based dev environment it should support all your requirements.
- 454
- 2
- 5