Menu

Project update

2004-08-26
2013-03-07
  • Edmund Tudor

    Edmund Tudor - 2004-08-26

    Well, Power Grid has been online for about a week, I've been working at cleaning up the code, fixing some bugs, and adding a new feature or two.

    I'm going to aim for the end of Sept. for the next release, maybe I'll even have some docs done (started working on them with doxygen) until then if you have any comments or suggestions post them here in the forum.

    thanx
    black_adder

     
    • Edmund Tudor

      Edmund Tudor - 2004-11-06

      Ok, due to circumstances, yadda yadda, it's taking a little longer than I thought. I have been making some progress though.
      One thing I've found is that having the color/attribute codes embedded in the strings are really slowing it down,  if I set the grid up with a lot of cells showing on screen, scrolling gets very jumpy. So I'm going to look at storing the colors/attributes in a seperate vector, that should speed things up quite a bit.

      And with a bit of help, the user column sizing is working much better.

      So, as soon as I've made that one change I'll put out the next release.

      black_adder

       
    • aditsu

      aditsu - 2004-11-08

      > One thing I've found is that having the color/attribute codes embedded in the strings are really slowing it down

      are you sure that is the cause? there are many things that could possibly slow it down
      anyway, they all need to be fixed :)

      > So I'm going to look at storing the colors/attributes in a seperate vector

      I think that's not the best approach
      if you continue that way, you'll end up having a bunch of different vectors, and maintaining them all will be a royal pain in the arse
      instead, why not follow one of the main OO concepts: encapsulation :)
      create a class/struct for storing all the necessary information for one cell, and keep only one vector (*) of cells; that way you can easily add or change new fields without creating much trouble, and it may be faster too

      (*) note: using one vector to store a resizable matrix is not the most efficient idea, just look at InsertCol/DeleteCol
      I was thinking of a 2-dimensional list with added vector-style indexing, or something like that; and I'll keep looking for something better
      but... one thing at a time :)

      I made up my mind by now, I really want to get involved as a developer - that means we should set up CVS and discuss how to work together without clashing :)
      but there is still one thing stopping me - I'm not happy with the license, I would like the library to be linkable to non-free programs
      I plan to start a big licensing discussion in the SMART library forum, you are welcome to join in if you are interested (I'll give you the link when I post the message)

      keep up the good work :)

      Adrian

       
    • Nobody/Anonymous

      Yes, I did some profiling, and it seemed to be spending a lot of time doing things with the strings, I think when I was separating the color codes from the rest of the string it was creating and destroying some temporary strings, which was using up a lot of time.
      I did a test where I just had the Cell() function return the entire string with the color code included, so all the cells showed something like 00 at the beginning of the strings. 
      I tested to see how scrolling performed with a large amount of cells showing. Before, scrolling would hesitate a lot, after the change there was no hesitation, and it looks like the user column sizing was smoother also.

      I was thinking of making a cell class, maybe I'll do that. I think I could store the cells in a vector of vectors... I've seen some ways to do that. Not sure if it would be better or worse than what I have now.

      I believe the license should allow using it in a non-free program, but it would still have to be open source. I'll see if there's one that would allow using it in a non-open source program.

      Oh, also I turned on warnings (I had it set as -wall, apparently it wants -Wall) and fixed all the warnings I found.

      b_a

       
    • aditsu

      aditsu - 2004-11-08

      > Yes, I did some profiling

      oh, I trust you then :)

      > I think I could store the cells in a vector of vectors... I've seen some ways to do that. Not sure if it would be better or worse than what I have now.

      probably better, but not the best
      just think of the complexity for deleting a row or column
      let me study the problem more, for now the 2D linked list is the best thing I can think of

      > I believe the license should allow using it in a non-free program, but it would still have to be open source.

      do you mean the current license, ie GPL?
      well, GPL is written by the FSF, and they defined their terms very clearly (but yes, they still create confusion):
      http://www.gnu.org/philosophy/selling.html
      http://www.gnu.org/philosophy/categories.html
      so "free" is *almost* synonym to "open-source", and "non-free" is the opposite of "free", i.e. free software, as in "free speech", not related to the price
      considering this, the GPL does not allow linking with non-free software

      > Oh, also I turned on warnings (I had it set as -wall, apparently it wants -Wall) and fixed all the warnings I found.

      great :)
      there is also -pedantic and -W, but you probably won't get many extra warnings

      Adrian

       
    • Edmund Tudor

      Edmund Tudor - 2004-11-09

      I had -pedantic on, and also -ansi, should I have that one? All -W did was cause it to complain about WinMain having unused parameters since the previous instance handle and args aren't used.

       

Log in to post a comment.