Hi,
I am doing following to sort addressbook:
(1) Whatever new contact user add, everytime we save firstname, lastname, companyname & email address in file(Per contact it's seperate file on local disk of server)
(2) For example,if user wants to sort by companyname, in
java class I do following:
(i) I get list of file names in vector. Then in for loop, I read each file, get firstname, last name, company name & email and put in Hashtable.
(ii) Then from hashtable, i get first name, last name, companyname & email address and put in SortEngine(My Java class which use comparator to sort the things)object.
(iii) Then I put SortEngine object in List.
(iv) Then I use, Collections.sort(List,Comparator)
(v) Finally, I get first name,last name, company name & email from list & put in vector & finally I put in table of HTML.
Now the problem,is if i have 100 address only, then also it takes 4+ minutes to sort the things. It is very slow. How can I make this faster???
Thanks,
Angela