AmigaActive (119/2249)

From:Bart King
Date:3 Jul 2000 at 11:33:48
Subject:Re: Slow Datatypes was:PPC BMP Datatype

"Shinda " <shindakebab@yahoo.com> wrote:

> The datatypes file recog is not slow, if you want it to read file
> types via just extension then that can be done and that would be fast

99% of the time though, if you call DataTypes to recognize a file and read
data from it, you don't know what the file is.

Maybe my experience with DataTypes was never good - it's always taken about
five or six seconds to recognize one file here, no matter what system I've
had over the years. My image library supports (using file recognition),
IFF ILBM, BMP, PCX and my custom format before it enquires DataTypes - and
it's a lot faster than using DataTypes as standard.

Maybe a bit of a grouch I have with DataTypes as well is the fact that it
is such a pig to get any information out of it when you call DoMethod() -
you have to wait and it doesn't tell you what's going on. There's probably
some weird shit you can do with callback hooks and other Amiga-specific
things which should have been left to hang out to dry years ago.

> this is why most datatypes recognise files by reading in
> the first few characters.

Not always possible, but I see what you're saying. Some file formats need
to be interrogated quite a bit before you can decide whether or not you do
support them (i.e. WAV or PNG).

> For the speed why not try the file listing
> cli command on aminet which shows file type

I used Opus 5's file type display in a lister and it took a good 2 minutes
to complete scanning a directory with about 50 images all in different and
obscure formats.

> Datatypes can support writing as well but it seems most programmers
> are just too lazy to implement this.

I don't know whether or not "lazy" is a reason, but judging by experience,
it's not pretty. There's a lot of extra stuff you have to do as a
programmer to get your DataType class supporting write - and even then it
might not work... using DataType's "copy to clipboard" method really does
not work too well with non-textual files.

I suppose this relies on the fact that most image files use chunky
formatting, whereas Amiga's graphics.library is still in the stone age with
it's "planar" modes.

PS: This e-mail should be considered boring and not be read by anyone.



Bart King of Bartman Software -- damned if I do, damned if I don't
http://www.bartmansoftware.co.uk : Software Developer for Amiga and PC
http://snapshots.bartmansoftware.co.uk : FUBAR snapshots AVAILABLE NOW
http://arcnet.vapor.com : "bart" on ArcNET IRC (ICQ: 18178781)

------------------------------------------------------------------------
Spending too much calling friends all over the world? Join beMANY!
and pay less each month.
http://click.egroups.com/1/4259/4/_/468125/_/962655941/
------------------------------------------------------------------------

Quote carefully and read all ADMIN:README mails


Amiga Active have two mailing lists

Amiga Active Announce
This list is for annoncements about the magazine or web site. To subscribe on the web, go to http://www.egroups.com/subscribe/amigactive-announce. To subscribe by email, send a mail to amigactive-announce-subscribe@egroups.com.

Amiga Active list
This is a general discussion list, covering the magazine and other Amiga topics. To subscribe on the web, go to http://www.egroups.com/subscribe/amigactive. To subscribe by email, send a mail to amigactive-subscribe@egroups.com.