KDY911 Posted March 24, 2013 Posted March 24, 2013 So I've been working on this program that tunes to the radio stations, play your own music, search through youtube, repeat videos from youtube and convert youtube video to mp3. Started learning vb.net 4 months ago and been practicing here and there. So my question is how to optimize your program to use very little cpu and memory. I've learned a little on the multi-threading and use that in the program but haven't seen much of a difference. I've notice it takes up roughly 127,000K on and useful basis. Here is a copy of the program if you want to test it out yourself. Download - Download OneM.zip Code- Imports System.IO Imports System.Net Imports System.Threading Public Class - Pastebin.com
ass17 Posted March 24, 2013 Posted March 24, 2013 Without looking at your code you must always dispose of objects not used anymore, thus will release used memory, lowering the total used.
featured_spectre Posted March 24, 2013 Posted March 24, 2013 Post the code...I want to see if it can be improved upon.
KDY911 Posted March 24, 2013 Author Posted March 24, 2013 Ah my bad forgot to include the project file Here it is: https://dl.dropbox.com/u/14318663/OneMedia1.zip
featured_spectre Posted March 24, 2013 Posted March 24, 2013 Aside from the converting the youtube to mp3 function...it looks pretty solid
localzuk Posted March 24, 2013 Posted March 24, 2013 (edited) Something you have to remember with VB.Net is that it is a managed language - its resource usage is going to remain high, as it has several layers to go through before it hits the actual hardware. A little bit on how memory allocation works with .Net can be found here - http://stackoverflow.com/questions/223283/net-exe-memory-footprint Edited March 24, 2013 by localzuk 1
featured_spectre Posted March 24, 2013 Posted March 24, 2013 Right...having spent a while on it...here are the issues Ease of Use - not very. I let my mrs lose in a sandbox environment, and it took her a few minutes to figure out how to view a video in the app Showing of videos - not fantastic, either have it load in full screen, or the size of the app, not like a phone browser. Downloading of videos - critical error EVERY TIME in the sandbox environment when converting to MP3 Adding/Scanning for radio - needs to be made easier. Not the simplest of tasks to say the least The code you have is pretty well rounded, however the functionality, or lack thereof, makes it a nightmare Sorry, but I had to be brutal. There is room for improvement, and it has a lot of potential! 1
ass17 Posted March 24, 2013 Posted March 24, 2013 The code you have is pretty well rounded, however the functionality, or lack thereof, makes it a nightmare Sorry, but I had to be brutal. There is room for improvement, and it has a lot of potential! I agree, I took me nearly two years to get my projects flow correct, I design first, code second. If always ask myself how would the most basic of users feel using my software as it stands now? My software comes with no help what so ever because its so easy to use!! Have a look, its called Photo Magician - Possibly the worlds fastest bulk image resizer! http://www.photomagiciansoftware.co.uk 1
KDY911 Posted March 24, 2013 Author Posted March 24, 2013 Alright well thanks for the criticism helps me improve as a programmer. The program itself has only been in development for 4 days, I'm sure I can find some way to make it more user-friendly ^.^, Thanks again
featured_spectre Posted March 24, 2013 Posted March 24, 2013 Also..does it have to be VB.Net? C or C# or C++ would be much lighter and easier to work with
KDY911 Posted March 25, 2013 Author Posted March 25, 2013 C# is do-able, for C and C++ don't really have a an idea on how to get it going because I haven't done much with them. But what are you ideas with using C#? Aren't C# and VB.net kind of the same?
featured_spectre Posted March 25, 2013 Posted March 25, 2013 C# whilst similar in construct, uses less resources (such as RAM and CPU)
localzuk Posted March 25, 2013 Posted March 25, 2013 C# whilst similar in construct, uses less resources (such as RAM and CPU) Not true? Both compile down to CIL, which is used in the same way by the .Net runtime. Sure, the 2 compilers use slightly different decisions when running but the outcome is near enough identical.
featured_spectre Posted March 25, 2013 Posted March 25, 2013 Ive written 2 programs identical for university. On was Vb.net, the other C#. The C# one used about 1/5 less resources overall. This is where I pull my comparison. :-)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now