Opened 10 years ago

Closed 8 years ago

Last modified 8 years ago

#94 closed defect (fixed)

Loading files is too slow

Reported by: ibboard Owned by:
Priority: critical Milestone: WarFoundry WinForms 0.2
Component: WarFoundry-GUI-WinForms Version: Unknown or N/A
Keywords: Cc:
Blocked By: Blocking:

Description

The loading of files in the WinForms UI is triggered by opening the "Change Game System" dialog, but this can take a while to open. This is seemingly because file loading is taking a while.

The obvious reason would be because of the API and file checking, but the problem doesn't seem to occur in the GTK# interface. May end up being related to running Windows in a VM, but needs investigating.

Change History (12)

comment:1 Changed 10 years ago by ibboard

Milestone: WarFoundry 0.1

comment:2 Changed 10 years ago by ibboard

Looks like it might be because of exceptions caused trying to open non-Zip files as Zips. We might have to abandon the "smart" file loading and just fall back to Windows-esque dumb "does the file extension match" checking.

comment:3 Changed 10 years ago by ibboard

Milestone: WarFoundry 0.1WarFoundry 0.2

Loading seems quick again. Dropping back a milestone as it isn't a priority until people start putting junk in the "data" folder.

comment:4 Changed 10 years ago by ibboard

Status: newconfirmed

Move tickets to new "confirmed" status to show that they've been checked

comment:5 Changed 9 years ago by ibboard

Milestone: WarFoundry 0.2WarFoundry WinForms 0.2

Separate UI milestones from API milestones

comment:6 Changed 8 years ago by ibboard

Version: Unknown or N/A

Code seems to be particularly slow on the .racex file (6KB) and the Ork .adf file (38KB) that aren't valid Zip files. Looks like we need to handle them differently (possibly even a "dumb-Windows" file extension system).

comment:7 Changed 8 years ago by IBBoard <dev@…>

In [c70973b65090c99c8237b4474a47e7e2b2ac64f7/IBBoard.WarFoundry.API]:

Fixes #94: Loading files is too slow

  • Check file extensions to cut down on false-positive file loads.

NOTE: This solution isn't ideal, but SharpZipLib has a FIXME in that their scan will be slow on non-zips.

comment:8 Changed 8 years ago by ibboard

Resolution: fixed
Status: confirmedclosed

Close ticket - hooks obviously aren't 100% yet.

comment:9 Changed 8 years ago by ibboard

Re-open because I can't run unit tests properly and borked file loading.

comment:10 Changed 8 years ago by IBBoard <dev@…>

In [453640610ef9bba94852c514d56ad5410a44dbf1/IBBoard.WarFoundry.API.Tests]:

Re #94: Loading files is too slow

  • Add unit test to check loading time - we'll allow failure to be 10x slower

comment:11 Changed 8 years ago by IBBoard <dev@…>

In [03ccff4d5e8ae3db6903e9f241933cc1cbf7271b/IBBoard.WarFoundry.API.Tests]:

Re #94: Loading files is too slow

  • ACTUALLY fix the tests - Linux is somehow fast enough that it passes anyway, but Windows in VM failed

comment:12 Changed 8 years ago by IBBoard <dev@…>

In [6dce5122caca3ac56c9344e773bda38fa6b21c08/IBBoard.WarFoundry.API.Tests]:

Re #94: Slow file loading

  • Fix file names and file name references
  • Add test for file existing so that "doesn't exist" doesn't cause test to pass
Note: See TracTickets for help on using tickets.