About reading and writing efficiency

Developers
liyinghui
2004-04-17
2004-04-19
  • liyinghui
    liyinghui
    2004-04-17

    I found that the code reading and writing preference is a bit inefficient, so I want to optimize them. Is someone support me?

    And I also found the preference's data are all simple type, why don't we use ini file format, but pseudo xml format?

     
    • The reason for using a pseudo xml format is compatibility.  It makes it REALLY easy to add new items to preferences, and have the prefs file be 100% compatible across versions.  This was one of the main changes from 1.1.7 to 2.0.0.

      How is it inefficient?  What precisely do you propose doing to make pref reading and writing more efficient?

      If you can optimize it without altering the format, I am all in favor, but I would like to see the code seperately first, as prefs are rather central to DrPython's function.

       
    • liyinghui
      liyinghui
      2004-04-19

      I see. Why I thought it is inefficient? Because I saw the code reading an option while search the whole preference text, and reading other will search whole text again. Of cause, the preference file may not be too large, but I want to optimize the code more efficiently. And I saw the code of writing and reading is similar, and I can find a clarity way to reduce the code, and make the work of maintaining much easily. I'll send you a letter with my code soon. I'll not modify the code directly.