Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
E

Eder Sa

@Eder Sa
About
Posts
5
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to improve listbox databind in WIndows Mobile 6
    E Eder Sa

    Peter, I already trying do this, but i need improve the load of that 12k items. I already tried serialize and save the data in a file and load the file into the datasource, but the result are not good too. After loaded in memory my data, I use a filter with BinarySearch (modified) and works great. Thx for replys guys :)

    []'s Eder Sá

    C# database help tutorial question code-review

  • How to improve listbox databind in WIndows Mobile 6
    E Eder Sa

    Bad news X| I tried use the suggested method and the result of the test in a device (HTC Touch2) is a desaster! The device spend much time running SQLs when I use "like" (about 1~2 seconds). If the user type 100 characters, the total time of the operations is about 100~200 seconds. (not a good result) I did more tests in the device, and the results are worst. Look:

    SQLiteConnection cnn = openCon();
    string SQL = "select cod, desc from produtcs";
    SQLiteDataReader sDR;
    List<MyObj> data = new List<MyObj>();
    cnn.Open();

    // execution time: 1 second (emulator)
    // execution time: 1~2 second (device)
    SQLiteCommand sCommand = new SQLiteCommand(SQL, cnn);
    sDR = sCommand.ExecuteReader();

    // execution time: 5~6 seconds (emulator)
    // execution time: 18~20 seconds (device)
    // alternative test: 1 seconds (emulator)
    // alternative test: 6 seconds (device)
    while (sDR.Read())
    {
    data.Add(new MyObj(Convert.ToInt32(sDR["cod"].ToString()), sDR["desc"].ToString()));
    // Alternative test inserting null objects
    // data.Add(new MyObj());
    }

    // execution time: 6 seconds (emulator)
    // execution time: 18 seconds (device)
    // same times with alternative data
    listBox1.DataSource = data;

    // with GRID VIEW
    // execution time: 0 seconds (emulator)
    // execution time: 0 seconds (device)
    dataGrid1.DataSource = data;

    Now I'll try make it without use a List<> and insert direclty in a listBox. At the moment the best solution. I post my feedback later.

    []'s Eder Sá

    C# database help tutorial question code-review

  • How to improve listbox databind in WIndows Mobile 6
    E Eder Sa

    I implemented your suggestion and like the result. I need to do some more tests and I back later with feedback. Thx!

    []'s

    C# database help tutorial question code-review

  • How to improve listbox databind in WIndows Mobile 6
    E Eder Sa

    My first post and my first mistake. :sigh: I need to load all the data, because when the user types some letters in a filter, the focus moves in the list, searching for the first ocorrence (I use a binary search, but modified and it works fine!) I can move the topic to Mobile Forum?

    []'s

    C# database help tutorial question code-review

  • How to improve listbox databind in WIndows Mobile 6
    E Eder Sa

    Hi! I started a development of a application (in Windows Mobile 6) and now i have a little problem: My datasource have 11.000~12.000 registers and when I bind it to my ListBox, this action spend 6 seconds (I think its a lot) and now I want to reduce that time. Anyone now a way to do this? Some code to exemplify my situation:

    SQLiteConnection cnn = openCon();
    string SQL = "select cod, desc from produtcs";
    SQLiteDataReader sDR;
    List<MyObj> data = new List<MyObj>();
    cnn.Open();

    // execution time: 1 second
    SQLiteCommand sCommand = new SQLiteCommand(SQL, cnn);
    sDR = sCommand.ExecuteReader();

    // execution time: 5~6 seconds
    while (sDR.Read())
    {
    data.Add(new MyObj(sDR["cod"].ToString(), sDR["desc"].ToString()));
    }

    // execution time: 6 seconds
    listBox1.DataSource = data;

    I need populate MyObj after, cuz this I use the variable "data"

    class MyObj
    {
    public MyObj(int p1, string p2){ ... }
    private int cod;
    private string desc;
    private string ...
    private int ...

    // set and get methods
    // ... 
    

    }

    []'s Eder Sá

    []'s

    C# database help tutorial question code-review
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups