PlasmaShop 3

Announcements and discussion regarding any projects related to Cyan Worlds' Plasma Engine including (but not limited to) CyanWorlds.com Engine, Drizzle, OfflineKI, PyPRP, and libHSPlasma.

Re: PlasmaShop 3

Postby Zrax » Wed Nov 11, 2009 1:15 am

I was actually aware of this slowdown as well, although I haven't done anything about it yet... Unfortunately, regex matching does take time, so scanning dat several times is indeed likely to cause it to be pretty slow. The Delphi version (2.x) just uses normal filesystem glob matching, which is faster, but still doesn't really eliminate the problem... Actually, that's what I wanted to do for the Qt version too, but it wanted regex, so I used that for now >.>.

I like your idea, and perhaps I can take it to the next level; specifically, by scanning the entire game directory and filtering files into their respective directories as they're found, rather than only looking for files when we need them. That way, we're more likely to get all the files we want (this would eliminate the problem you had with duplicate log file entries entirely), and would inherantly speed up the scan process significantly. In short: great suggestion! :)
User avatar
Zrax
 
Posts: 206
Joined: Fri Sep 28, 2007 5:19 pm
Location: Waist-deep in a conecano

Re: PlasmaShop 3

Postby diafero » Wed Nov 11, 2009 6:34 am

I'm not sure if doing it for the other directories (besides dat) is worth the effort - you have that recursive convenience function there, and most importantly they are not scanned multiple times. So I'd leave them as-is. If I recall the code correctly, the dat scanning is the only one not using RecursiveAddFiles, so it is kind of separate anyway. Your suggestion would be more like a re-write, requiring me to dig much deeper into the sources and understand the way you are saving the game directory - if you have too much to do or want me to do the patch for other reasons, I think I'd go the easier route. However, if you say you'll do it yourself, I agree a full scan would be the cleaner solution (maybe with an additional "folder" being added to your view collecting unknown purpose files).
I prefer e-mails to "diafero arcor de" (after adding the at and the dot) over PMs.

"Many people's horizon is a circle with a radius of zero. They call it their point of view."

Deep Island Shard | Offline KI
diafero
Deep Island Admin
 
Posts: 2966
Joined: Mon May 05, 2008 5:50 am
Location: Germany

Re: PlasmaShop 3

Postby Zrax » Thu Nov 12, 2009 2:12 am

Oh, I didn't realize you were offering to do it... If I do it myself, I'd definitely be more likely to choose the cleaner solution (handling the whole directory at once), possibly even with a filesystem notifier for added/deleted/modified files... I realize what you're saying about not needing to worry about the other directories, but remember that in the current implementation, it's still matching the regex on every file anyway, so the speed benefit would still apply in these cases. Anyway, if you really want to do it, I'll let you, but otherwise I'll probably just implement the full scan solution sometime this week or weekend ;)
User avatar
Zrax
 
Posts: 206
Joined: Fri Sep 28, 2007 5:19 pm
Location: Waist-deep in a conecano

Re: PlasmaShop 3

Postby diafero » Thu Nov 12, 2009 4:23 am

Well, I could not even start before this weekend, so go ahead :)
I prefer e-mails to "diafero arcor de" (after adding the at and the dot) over PMs.

"Many people's horizon is a circle with a radius of zero. They call it their point of view."

Deep Island Shard | Offline KI
diafero
Deep Island Admin
 
Posts: 2966
Joined: Mon May 05, 2008 5:50 am
Location: Germany

Re: PlasmaShop 3

Postby diafero » Sat Nov 21, 2009 1:09 pm

After your latest commits, startup time is comparable to the one of PlasmaShop2 with wine - thanks a lot :)
I prefer e-mails to "diafero arcor de" (after adding the at and the dot) over PMs.

"Many people's horizon is a circle with a radius of zero. They call it their point of view."

Deep Island Shard | Offline KI
diafero
Deep Island Admin
 
Posts: 2966
Joined: Mon May 05, 2008 5:50 am
Location: Germany

Re: PlasmaShop 3

Postby diafero » Mon Nov 23, 2009 1:48 pm

I encountered some weird effects with the new file processing:
- First of all, the "dummy" age files Drizzle creates in dat/dummyages are now also listed as age in PlasmaShop
- Second, the pages are no longer in a "subfolder" - is that on purpose?
- And third, the fni files in the ini directory end up in the "Ages" folder...
Nevertheless, the speed improvement is great, so these are just minor drawbacks :)
I prefer e-mails to "diafero arcor de" (after adding the at and the dot) over PMs.

"Many people's horizon is a circle with a radius of zero. They call it their point of view."

Deep Island Shard | Offline KI
diafero
Deep Island Admin
 
Posts: 2966
Joined: Mon May 05, 2008 5:50 am
Location: Germany

Re: PlasmaShop 3

Postby Zrax » Mon Nov 23, 2009 11:48 pm

diafero wrote:- First of all, the "dummy" age files Drizzle creates in dat/dummyages are now also listed as age in PlasmaShop

Ah yes, easy fix though...

diafero wrote:- Second, the pages are no longer in a "subfolder" - is that on purpose?

Yes, it is... I was originally redesigning it to work the same as the old way, but I realized there was no real reason to put the PRP files in their own subfolder... Plus, then I'd have to re-sort the folders in each age, since the "Districts" folder was only a meta-folder anyway ;)

diafero wrote:- And third, the fni files in the ini directory end up in the "Ages" folder...

Ok, again an easy fix... ;)

Thanks again!

EDIT: And fixed. I'll wait to update the prebuilt Windows binaries though until I finish the .sum file editor I'm working on now...
User avatar
Zrax
 
Posts: 206
Joined: Fri Sep 28, 2007 5:19 pm
Location: Waist-deep in a conecano

Previous

Return to Plasma Development

Who is online

Users browsing this forum: No registered users and 7 guests

cron