Drop file-engine abstraction from public API
authorJoão Abecasis <joao.abecasis@nokia.com>
Fri, 17 Feb 2012 19:09:17 +0000 (20:09 +0100)
committerQt by Nokia <qt-info@nokia.com>
Tue, 21 Feb 2012 23:07:31 +0000 (00:07 +0100)
commit7bbe79fe5f54ed7542d935600036d3c8b401505f
treec37504bd357768150ea75b79b947ad570729ca5e
parent9beeb3030be3e0ab6513164b785fca3ade4c90e9
Drop file-engine abstraction from public API

This abstraction imposed serious performance penalties and is being
dropped from the public API.

In particular, by allowing file names to be arbitrarily hijacked by
different file engines, and requiring engines to be instantiated in
order to decide, it imposed unnecessary overhead on all file operations.

Another flaw in the design with direct impact on performance is how
engines have no way to provide (or retain) additional information
obtained when querying the filesystem. In many places this has meant
repeated operations on the file system, where useful information is
immediately discarded to be queried again subsequently.

For Qt 4.8 a major refactoring of the code base took place to allow
bypassing the file-engine abstraction in select places, with
considerable performance gains observed. In Qt 5 it is expected we'll be
able to take this further, reaping even more benefits, but the
abstraction has to go.

[Dropping this now does not preclude that virtual file systems make an
appearance in Qt at a later point in Qt 5's lifecycle. Hopefully with a
new and improved abstraction.]

Forward declarations for QFileExtension(Result) were dropped, as the
classes were never used or defined.

Tests using "internalized" classes will only fully run on developer
builds. QFSFileEngine was removed altogether from exception safety test,
as it isn't its intent to test internal API.

Change-Id: Ie910e6c2628be202ea9e05366b091d6d529b246b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
37 files changed:
dist/changes-5.0.0
qmake/qmake.pri
src/corelib/io/io.pri
src/corelib/io/qabstractfileengine.cpp
src/corelib/io/qabstractfileengine.h [deleted file]
src/corelib/io/qabstractfileengine_p.h
src/corelib/io/qdir.cpp
src/corelib/io/qdiriterator.cpp
src/corelib/io/qfile.cpp
src/corelib/io/qfile_p.h
src/corelib/io/qfileinfo_p.h
src/corelib/io/qfilesystemengine_unix.cpp
src/corelib/io/qfilesystemengine_win.cpp
src/corelib/io/qfilesystemmetadata_p.h
src/corelib/io/qfsfileengine.cpp
src/corelib/io/qfsfileengine.h [deleted file]
src/corelib/io/qfsfileengine_iterator_p.h
src/corelib/io/qfsfileengine_p.h
src/corelib/io/qfsfileengine_unix.cpp
src/corelib/io/qfsfileengine_win.cpp
src/corelib/io/qresource_iterator_p.h
src/corelib/io/qresource_p.h
src/network/access/qnetworkreplyfileimpl_p.h
src/tools/uic/qclass_lib_map.h
src/widgets/dialogs/qfileinfogatherer.cpp
tests/auto/corelib/io/io.pro
tests/auto/corelib/io/qabstractfileengine/qabstractfileengine.pro
tests/auto/corelib/io/qabstractfileengine/tst_qabstractfileengine.cpp
tests/auto/corelib/io/qdir/qdir.pro
tests/auto/corelib/io/qdir/tst_qdir.cpp
tests/auto/corelib/io/qdiriterator/qdiriterator.pro
tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp
tests/auto/corelib/io/qfile/test/test.pro
tests/auto/corelib/io/qfile/tst_qfile.cpp
tests/auto/other/exceptionsafety_objects/tst_exceptionsafety_objects.cpp
tests/benchmarks/corelib/io/qfile/main.cpp
tests/benchmarks/corelib/io/qfile/qfile.pro