i'm creating windows forms application ms visual studio 2010. problem need print on 1 million lines of text textbox on gui. i'm first using stringbuilder prepare string printing textbox. since there many lines, text fails show on textbox , blank box. know string has been built can print text file fine.
i wondering whether can suggest way handle situation?
what can display text on gui?
that bad design idea!! in user perspective way never able handle 1 million lines of text. if not, take example: if takes 20 seconds per line need 5555.55 hours read them all, aprox. 3.5 years (considering 8 h/day on 200 day year). imaginge scrollbar 1 million lines: in 800 pixel height, 1 pixes scrollbar move scroll 1.250 lines of text. now, technical part, if put 1.000.000 lines in text box, if consider in average each line has 40 characters ( that's 40.000.000 in ascii , 80.000.000 in utf-16), in rough terms , in best case scenario 40 gb of memory string.
general idea: don't that!
if user requires navigate in of million records, think grid interface pagination , filtering.
Comments
Post a Comment