我在C#中写过了一个方案。 现在,我完成了所有功能,并发挥了作用。 但只有一对一线。 我做大量计算,有时在申请中装上大约300份甲基溴或更多测量文档。
我现在想使该方案变得多面,因为在密集处理或i/o作业时,用户的权宜之计确实很差。
What is the best way to refactor the program, so that it can be made multithreaded without too much affort? I know this is stuff I should have thougth before. But I havn t.
我使用了单一吨模式,用于大约3个重要单元,这些单元几乎涉及该方案的所有其他功能。
I used a more or less clean MVC (Model View Control) architecture. So I wonder if it is maybe possible to let the User Interface run in one thread and the rest of the application in another.
If not, loading and parsing 300MB, creating objects will take about 3 minutes to finish. In this time the user gets no response from the GUI. :/
UPDATE: My singletons are used as a kind of storage. One singleton saves the objects of the parsed measurement files, while the other singleton saves the result. I have different calculations, which use the same measurementfiles and creating results which they want to save using the other singleton. This is one problem.
第二是保持对用户行动的伪装,或至少避免这一警告,即窗口没有作出反应。
感谢大家的所有建议。 我将审判他们。 晚期答复。