- Регистрация
- 26.03.2012
- Сообщения
- 44
- Благодарностей
- 6
- Баллы
- 0
I'm designing a template part that will be used pretty heavily within other templates that I plan to design so I want to make sure I'm doing it as well as I can.
If I have a text file with 10 or so lines in it and each line needs to be read but separated (not within one big block but 10 separate strings), I see two ways to do this.
1.) I could set up 10 steps each one with a macro to read one of the lines 0-9.
2.) I could set up 1 step to pull the whole block of text and then 10 steps to parse out the pieces needed.
I doubt it makes a whole lot of difference but thought if I had a ton of threads running trying to access this file over and over for the same info it might be slightly less efficient than if each thread only needed to access the file once. Then the info needed is all stored within that thread rather than having a ton of threads all accessing a specific file 10 times each.
Plus the file may end up being more than 10 lines long so the longer it gets the more important this would be - but I'm not 100% sure if this is true or not.
Am I thinking about this right? Which one is more efficient?
If I have a text file with 10 or so lines in it and each line needs to be read but separated (not within one big block but 10 separate strings), I see two ways to do this.
1.) I could set up 10 steps each one with a macro to read one of the lines 0-9.
2.) I could set up 1 step to pull the whole block of text and then 10 steps to parse out the pieces needed.
I doubt it makes a whole lot of difference but thought if I had a ton of threads running trying to access this file over and over for the same info it might be slightly less efficient than if each thread only needed to access the file once. Then the info needed is all stored within that thread rather than having a ton of threads all accessing a specific file 10 times each.
Plus the file may end up being more than 10 lines long so the longer it gets the more important this would be - but I'm not 100% sure if this is true or not.
Am I thinking about this right? Which one is more efficient?