+ Post New Thread
Results 1 to 14 of 14
Coding Thread, Question on VB.net in Coding and Web Development; So I've been working on this program that tunes to the radio stations, play your own music, search through youtube, ...
  1. #1

    Join Date
    Mar 2013
    Posts
    4
    Thank Post
    2
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Question on VB.net

    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

  2. #2
    ass17's Avatar
    Join Date
    Feb 2013
    Posts
    269
    Thank Post
    5
    Thanked 26 Times in 26 Posts
    Rep Power
    24
    Without looking at your code you must always dispose of objects not used anymore, thus will release used memory, lowering the total used.

  3. #3

    nephilim's Avatar
    Join Date
    Nov 2008
    Location
    Dunstable
    Posts
    11,094
    Thank Post
    1,428
    Thanked 1,692 Times in 1,265 Posts
    Blog Entries
    2
    Rep Power
    363
    Post the code...I want to see if it can be improved upon.

  4. #4

    Join Date
    Mar 2013
    Posts
    4
    Thank Post
    2
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Ah my bad forgot to include the project file :P

    Here it is: https://dl.dropbox.com/u/14318663/OneMedia1.zip

  5. #5

    nephilim's Avatar
    Join Date
    Nov 2008
    Location
    Dunstable
    Posts
    11,094
    Thank Post
    1,428
    Thanked 1,692 Times in 1,265 Posts
    Blog Entries
    2
    Rep Power
    363
    Aside from the converting the youtube to mp3 function...it looks pretty solid

  6. #6

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Minehead
    Posts
    17,089
    Thank Post
    511
    Thanked 2,308 Times in 1,784 Posts
    Blog Entries
    24
    Rep Power
    803
    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/2...mory-footprint
    Last edited by localzuk; 24th March 2013 at 05:12 PM.

  7. Thanks to localzuk from:

    KDY911 (24th March 2013)

  8. #7

    nephilim's Avatar
    Join Date
    Nov 2008
    Location
    Dunstable
    Posts
    11,094
    Thank Post
    1,428
    Thanked 1,692 Times in 1,265 Posts
    Blog Entries
    2
    Rep Power
    363
    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!

  9. Thanks to nephilim from:

    KDY911 (24th March 2013)

  10. #8
    ass17's Avatar
    Join Date
    Feb 2013
    Posts
    269
    Thank Post
    5
    Thanked 26 Times in 26 Posts
    Rep Power
    24
    Quote Originally Posted by nephilim View Post

    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

  11. Thanks to ass17 from:

    nephilim (24th March 2013)

  12. #9

    Join Date
    Mar 2013
    Posts
    4
    Thank Post
    2
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    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

  13. #10

    nephilim's Avatar
    Join Date
    Nov 2008
    Location
    Dunstable
    Posts
    11,094
    Thank Post
    1,428
    Thanked 1,692 Times in 1,265 Posts
    Blog Entries
    2
    Rep Power
    363
    Also..does it have to be VB.Net?

    C or C# or C++ would be much lighter and easier to work with

  14. #11

    Join Date
    Mar 2013
    Posts
    4
    Thank Post
    2
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    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?

  15. #12

    nephilim's Avatar
    Join Date
    Nov 2008
    Location
    Dunstable
    Posts
    11,094
    Thank Post
    1,428
    Thanked 1,692 Times in 1,265 Posts
    Blog Entries
    2
    Rep Power
    363
    C# whilst similar in construct, uses less resources (such as RAM and CPU)

  16. #13

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Minehead
    Posts
    17,089
    Thank Post
    511
    Thanked 2,308 Times in 1,784 Posts
    Blog Entries
    24
    Rep Power
    803
    Quote Originally Posted by nephilim View Post
    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.

  17. #14

    nephilim's Avatar
    Join Date
    Nov 2008
    Location
    Dunstable
    Posts
    11,094
    Thank Post
    1,428
    Thanked 1,692 Times in 1,265 Posts
    Blog Entries
    2
    Rep Power
    363
    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. :-)

SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 1
    Last Post: 25th May 2011, 01:14 PM
  2. Replies: 4
    Last Post: 30th December 2009, 09:57 AM
  3. VB.Net running on your network?
    By Andi in forum Windows
    Replies: 9
    Last Post: 7th November 2007, 08:40 AM
  4. VB.Net Help
    By mloveless in forum Coding
    Replies: 2
    Last Post: 29th June 2007, 04:24 PM
  5. AD question on Exchange server.
    By Kyle in forum Windows
    Replies: 3
    Last Post: 6th July 2006, 10:21 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •