VBAndCs / sVB-Small-Visual-Basic

Small Visual Basic (sVB) is an educational programming language, created by Eng. Mohammad Hamdy as an evolved version of Microsoft Small Basic (SB). It is meant to be easier and more powerful at the same time, to introduce programming basics to kids and beginners of any age, provided that they can use the English keyboard on the Windows OS.
Other
232 stars 16 forks source link

Compilation takes an excessively long time, exceeding one minute! #85

Closed dynamicboy closed 3 weeks ago

dynamicboy commented 3 weeks ago

With my project now exceeding 3,000 lines, compilation times have become excessively long, taking over a minute.

Furthermore, since my project involves timers, the debugger becomes unusable, and I have to rely on TextWindow.WriteLine() to inspect variable values, which is frustrating.

The slow compilation times are significantly hindering my development process, making it slow and inefficient.

Even when I make only minor code changes, the entire compilation process still takes a very long time. The last compilation took 1 minute and 18 seconds.

Could you please optimize the compilation time? Alternatively, would upgrading my PC be the only solution?

For reference, my CPU is an Intel i5 4690k running at 3.86GHz during compilation.

2024-09-18_210402

2024-09-18_211504

VBAndCs commented 3 weeks ago

I am sorry for your suffering, but sVB is designed as an educational language and not aimed for production and commercial projects. Creating such large projects is not good for educational purposes, so, you have two options here:

1. If you are using sVB for real projects, I advice you to take the next step to VB .NET. One of sVB purposes is to ease this transition. You will find yourself familiar with most of the VB .NET syntax, and you VS .NET will offer you a wealth of very useful and professional tools like the debugger. Actually tou can't expect of me to do all the work that MS teams did over the past 22 years! 2. You can split tour source code into small sVB libraries and use them in your project, which will have a reasonable code line number.

I wish you find this answer helpful. Regards


From: dynamicboy @.> Sent: Wednesday, September 18, 2024 1:16 PM To: VBAndCs/sVB-Small-Visual-Basic @.> Cc: Subscribed @.***> Subject: [VBAndCs/sVB-Small-Visual-Basic] Compilation takes an excessively long time, exceeding one minute! (Issue #85)

With my project now exceeding 3,000 lines, compilation times have become excessively long, taking over a minute.

Furthermore, since my project involves timers, the debugger becomes unusable, and I have to rely on TextWindow.WriteLine() to inspect variable values, which is frustrating.

The slow compilation times are significantly hindering my development process, making it slow and inefficient.

Even when I make only minor code changes, the entire compilation process still takes a very long time. The last compilation took 1 minute and 18 seconds.

Could you please optimize the compilation time? Alternatively, would upgrading my PC be the only solution?

For reference, my CPU is an Intel i5 4690k running at 3.86GHz during compilation.

2024-09-18_210402.png (view on web)https://github.com/user-attachments/assets/b721a26a-e80e-4949-a59e-43a41687b465

2024-09-18_211504.png (view on web)https://github.com/user-attachments/assets/778384ca-0793-49f7-b992-b37f1bcf6b71

— Reply to this email directly, view it on GitHubhttps://github.com/VBAndCs/sVB-Small-Visual-Basic/issues/85, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALQ5MVRFDMGIWMGAC2KREQ3ZXF4JZAVCNFSM6AAAAABONVUH6OVHI2DSMVQWIX3LMV43ASLTON2WKOZSGUZTGNZSGAZTMNI. You are receiving this because you are subscribed to this thread.

[https://s-install.avcdn.net/ipm/preview/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif]https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail Virus-free.www.avast.comhttps://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail

dynamicboy commented 3 weeks ago

I am sorry for your suffering, but sVB is designed as an educational language and not aimed for production and commercial projects. Creating such large projects is not good for educational purposes, so, you have two options here: 1. If you are using sVB for real projects, I advice you to take the next step to VB .NET. One of sVB purposes is to ease this transition. You will find yourself familiar with most of the VB .NET syntax, and you VS .NET will offer you a wealth of very useful and professional tools like the debugger. Actually tou can't expect of me to do all the work that MS teams did over the past 22 years! 2. You can split tour source code into small sVB libraries and use them in your project, which will have a reasonable code line number. I wish you find this answer helpful. Regards ____ From: dynamicboy @.> Sent: Wednesday, September 18, 2024 1:16 PM To: VBAndCs/sVB-Small-Visual-Basic @.> Cc: Subscribed @.***> Subject: [VBAndCs/sVB-Small-Visual-Basic] Compilation takes an excessively long time, exceeding one minute! (Issue #85) With my project now exceeding 3,000 lines, compilation times have become excessively long, taking over a minute. Furthermore, since my project involves timers, the debugger becomes unusable, and I have to rely on TextWindow.WriteLine() to inspect variable values, which is frustrating. The slow compilation times are significantly hindering my development process, making it slow and inefficient. Even when I make only minor code changes, the entire compilation process still takes a very long time. The last compilation took 1 minute and 18 seconds. Could you please optimize the compilation time? Alternatively, would upgrading my PC be the only solution? For reference, my CPU is an Intel i5 4690k running at 3.86GHz during compilation. 2024-09-18_210402.png (view on web)https://github.com/user-attachments/assets/b721a26a-e80e-4949-a59e-43a41687b465 2024-09-18_211504.png (view on web)https://github.com/user-attachments/assets/778384ca-0793-49f7-b992-b37f1bcf6b71 — Reply to this email directly, view it on GitHub<#85>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALQ5MVRFDMGIWMGAC2KREQ3ZXF4JZAVCNFSM6AAAAABONVUH6OVHI2DSMVQWIX3LMV43ASLTON2WKOZSGUZTGNZSGAZTMNI. You are receiving this because you are subscribed to this thread. [https://s-install.avcdn.net/ipm/preview/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif]https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail Virus-free.www.avast.com<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>

I apologize for requesting so much. Initially, this project was small, but as development progressed, it gradually grew in scale. Fortunately, it is now approximately one-tenth away from completion. Along the way, I also took the opportunity to learn about WPF, but I found it to be too overwhelming, requiring a significant amount of time to master, despite my prior familiarity with related concepts and intermediate-level proficiency in C#. However, after spending over half a year learning and experimenting with sVB, I have become proficient in it, and the IDE is remarkably lightweight, allowing me to start working immediately. Moreover, from my initial encounter with sVB 2.X to the current 3.X version, it has gradually met my basic development needs, with significant improvements in stability and performance (I've noticed that bulk image tag movements are no longer as laggy as before, possibly due to image caching). In this large project, I have also written functions in the GBLib library, such as drawing various basic shapes and combining images with text in card functions, among others. Once this large project is completed, if I encounter similar requirements in the future, I may opt for Visual Studio + WPF + C#/VB.NET. For smaller projects, I will continue to use lightweight sVB. Having gone through the trials of this large project, I believe sVB has reached a high level of maturity, making it an opportune time to promote it vigorously. I plan to create a series of tutorial videos and demo programs on my Douyin (Chinese TikTok) account, showcasing its ease of use and versatility, to attract more students and adults interested in programming to learn and utilize sVB, thereby kick-starting their programming journey. During this process, we can also share utility libraries for sVB, similar to Python's vast libraries that make it extremely user-friendly and popular. Additionally, I may sell some software tools I've developed, as Douyin also provides online sales functionality. (Translated by AI)

VBAndCs commented 3 weeks ago

Small Visual Basic can never be a production language. its runtime is built on the primitive structure, which has a very bad performance but makes the code very simple by hiding basic data types and the conversions between them from sVB code. This is faire trade off, and if we want to avoid it, we will need to rebuild the compiler and the type system to create a more efficient language, but this eventually will end up ercereating VB .NET!

You should first use VB .NET with Windows Forms applications, where you'll find it similar to sVB. You can also use Option Explicit Off Option Strict Off At the top of the VB file to turn on its dynamic mode where you don't need to use Dim to declare variables, which will allow you to past sVB code as it is. But of course there are some differences in the libraries, so you may add a reference to the ssmallVisualBasicLibrary.dll to the project, to make the transition easier. This will make the sVB code reuable in VB with little changes. But there is a final step: if you want to reuse the sVB forms (which are WPF forms), start by creating a VB .NET console application (.NET framework), reference the sVB Lib dll, copy the form1.xaml file to the bin/debug (or release) folder of the project, then paste thee code from the form1.sb,gen followed by the code of the Form1.sb in the VB .NET file. The most medications tou will need are changing EndSub to End Sub, EndFunction to EndFunction, Wend to End While, ExitLoop to Exit For or Exit While.... etc SB has a graduate button to convert SB code to VB, but it was a failure. I always wanted to modify it to generate the VB project as mentioned above, especially that it will be built on the code I am using in the debugger, but it will need some work and there are more important tasks (like completing the sVB kid programmer book series). I think you will enjoy this experiment, and after you manage to run your sVB projects in VB .NET that way, you can start to convert them to a real WinForms apps, where you will learn a lot in the process. Later on, you may revisit WPF.


From: dynamicboy @.> Sent: Thursday, September 19, 2024 3:31 AM To: VBAndCs/sVB-Small-Visual-Basic @.> Cc: Mohammad Hamdy Ghanem @.>; Comment @.> Subject: Re: [VBAndCs/sVB-Small-Visual-Basic] Compilation takes an excessively long time, exceeding one minute! (Issue #85)

I am sorry for your suffering, but sVB is designed as an educational language and not aimed for production and commercial projects. Creating such large projects is not good for educational purposes, so, you have two options here: 1. If you are using sVB for real projects, I advice you to take the next step to VB .NET. One of sVB purposes is to ease this transition. You will find yourself familiar with most of the VB .NET syntax, and you VS .NET will offer you a wealth of very useful and professional tools like the debugger. Actually tou can't expect of me to do all the work that MS teams did over the past 22 years! 2. You can split tour source code into small sVB libraries and use them in your project, which will have a reasonable code line number. I wish you find this answer helpful. Regards … ____ From: dynamicboy @.> Sent: Wednesday, September 18, 2024 1:16 PM To: VBAndCs/sVB-Small-Visual-Basic @.> Cc: Subscribed @.***> Subject: [VBAndCs/sVB-Small-Visual-Basic] Compilation takes an excessively long time, exceeding one minute! (Issue #85https://github.com/VBAndCs/sVB-Small-Visual-Basic/issues/85) With my project now exceeding 3,000 lines, compilation times have become excessively long, taking over a minute. Furthermore, since my project involves timers, the debugger becomes unusable, and I have to rely on TextWindow.WriteLine() to inspect variable values, which is frustrating. The slow compilation times are significantly hindering my development process, making it slow and inefficient. Even when I make only minor code changes, the entire compilation process still takes a very long time. The last compilation took 1 minute and 18 seconds. Could you please optimize the compilation time? Alternatively, would upgrading my PC be the only solution? For reference, my CPU is an Intel i5 4690k running at 3.86GHz during compilation. 2024-09-18_210402.png (view on web)https://github.com/user-attachments/assets/b721a26a-e80e-4949-a59e-43a41687b465 2024-09-18_211504.png (view on web)https://github.com/user-attachments/assets/778384ca-0793-49f7-b992-b37f1bcf6b71 — Reply to this email directly, view it on GitHub<#85https://github.com/VBAndCs/sVB-Small-Visual-Basic/issues/85>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALQ5MVRFDMGIWMGAC2KREQ3ZXF4JZAVCNFSM6AAAAABONVUH6OVHI2DSMVQWIX3LMV43ASLTON2WKOZSGUZTGNZSGAZTMNI. You are receiving this because you are subscribed to this thread. [https://s-install.avcdn.net/ipm/preview/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif]https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail Virus-free.[http://www.avast.com%3Chttps://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail]www.avast.comhttps://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail

I apologize for requesting so much. Initially, this project was small, but as development progressed, it gradually grew in scale. Fortunately, it is now approximately one-tenth away from completion. Along the way, I also took the opportunity to learn about WPF, but I found it to be too overwhelming, requiring a significant amount of time to master, despite my prior familiarity with related concepts and intermediate-level proficiency in C#. However, after spending over half a year learning and experimenting with sVB, I have become proficient in it, and the IDE is remarkably lightweight, allowing me to start working immediately. Moreover, from my initial encounter with sVB 2.X to the current 3.X version, it has gradually met my basic development needs, with significant improvements in stability and performance (I've noticed that bulk image tag movements are no longer as laggy as before, possibly due to image caching). In this large project, I have also written functions in the GBLib library, such as drawing various basic shapes and combining images with text in card functions, among others. Once this large project is completed, if I encounter similar requirements in the future, I may opt for Visual Studio + WPF + C#/VB.NET. For smaller projects, I will continue to use lightweight sVB. Having gone through the trials of this large project, I believe sVB has reached a high level of maturity, making it an opportune time to promote it vigorously. I plan to create a series of tutorial videos and demo programs on my Douyin (Chinese TikTok) account, showcasing its ease of use and versatility, to attract more students and adults interested in programming to learn and utilize sVB, thereby kick-starting their programming journey. During this process, we can also share utility libraries for sVB, similar to Python's vast libraries that make it extremely user-friendly and popular. Additionally, I may sell some software tools I've developed, as Douyin also provides online sales functionality. (Translated by AI)

— Reply to this email directly, view it on GitHubhttps://github.com/VBAndCs/sVB-Small-Visual-Basic/issues/85#issuecomment-2359905314, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALQ5MVQRRWDMYKZYJXHIQ6LZXJAR7AVCNFSM6AAAAABONVUH6OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJZHEYDKMZRGQ. You are receiving this because you commented.