Hi
Here are some ideas for optimizing our gdi object code:
1.) When allocating, locking and deleting a gdi object, we pass the
global variable GdiHandleTable to GDIOBJ_AllocObj(). Do we really need
this? Is there a case where we pass something else? We would only save
few cycles here, but if we don't need it...
2.) When allocating a gdi object, we first need to search the list of
LookasideLists. My suggestion is to give each gdi object type a constant
index in the list and pass that index instead of the object type value.
That would require that the table for the object types/sizes/CleanupProc
is in sync with the index definitions. This could be achieved by
initializing that table on win32k load:
InitGdiObjectType(UINT Index, LONG GdiType, ULONG_PTR ObjectSize,
GDICLEANUPPROC CleanupProc);
Then we only need to make sure, that every index is only there once and
add one line for each object in GDIOBJ_iAllocHandleTable to initialize
the object type.
3.) ROS makes massive use of gdi object handles. It uses a lot more
handles than windows does. That is because every object we use is always
inserted into the handle table. This is slow and wastes handle entries,
wich are a limited resource. Whenever we need a (temporary) object, we
allocate it (find lookaside list, allocate mem, find free entry, lock
entry, do some stuff, unlock entry), then in a second call lock it (do
some checks, lock entry, return pointer) and at the end unlock it and
then delete it.
I think we should rewrite the code a little, so that we only create
handles, when the object reaches usermode and use pointers to mem
objects instead if the objects are kernel mode / temporary only.
XXXOBJ_AllocObj(UINT Index) -> allocate an entry from the LookasideList
and initialize it. Don't create a handle.
XXXOBJ_FreeObj(PVOID pObjBody) -> free the entry from the LookasideList
GDIOBJ_CreateHandle(PVOID pObjBody, UINT Index, LONG GdiType) -> create
a handle for a given mem object
rewrite some XXXOBJ_Xxx apis to deal with pointers to the mem objects
instead of handles (see REGION_Xxx apis)
Imo this should result in a big speed increase for several ntgdi/ntuser apis
Regards,
Timo
Hello.
No, I didn't see the creation of a DLL from the log file.
Perhaps I had understood that zlib was compiled as a static library (eh eh), but in my opinion this isn't the best way for using a robust, thread safe library like this one.
I also agree that I could explain my idea wrongly.
Searching into the online english dictionary... and I found a better word, perhaps "redundant" sounds better than "unuseful".
Sincerely,
Carlo Bramini.
---------- Initial Header -----------
>From : ros-dev-bounces(a)reactos.org
To : "ReactOS Development List" ros-dev(a)reactos.org
Cc :
Date : Wed, 05 Sep 2007 11:21:07 -0400
Subject : Re: [ros-dev] Build with zlib
> Um, because it's a static library? Do you see it in the "dll" directory or
> in the "lib" directory?
>
> -----Original Message-----
> From: ros-dev-bounces(a)reactos.org [mailto:ros-dev-bounces@reactos.org] On
> Behalf Of carlo.bramix
> Sent: September-04-07 5:19 AM
> To: ros-dev
> Subject: [ros-dev] Build with zlib
>
> Hello,
> from the compilation log you can read:
>
> [CC] lib\3rdparty\zlib\adler32.c
> [CC] lib\3rdparty\zlib\compress.c
> [CC] lib\3rdparty\zlib\crc32.c
> [CC] lib\3rdparty\zlib\gzio.c
> [CC] lib\3rdparty\zlib\uncompr.c
> [CC] lib\3rdparty\zlib\deflate.c
> [CC] lib\3rdparty\zlib\trees.c
> [CC] lib\3rdparty\zlib\zutil.c
> [CC] lib\3rdparty\zlib\inflate.c
> [CC] lib\3rdparty\zlib\infback.c
> [CC] lib\3rdparty\zlib\inftrees.c
> [CC] lib\3rdparty\zlib\inffast.c
> [AR] obj-i386\lib\3rdparty\zlib\zlib.a
>
> why does it compile zlib.a (absolutely unuseful in my opinion) instead of
> zlib1.dll with its libz.a?
> This log has been taken from the compilation of ReactOS and *not* from the
> "make bootcd" session.
>
> Sincerely,
>
> Carlo Bramini.
>
>
>
> ------------------------------------------------------
> Leggi GRATIS le tue mail con il telefonino i-modeT di Wind
> http://i-mode.wind.it/
>
>
> _______________________________________________
> Ros-dev mailing list
> Ros-dev(a)reactos.org
> http://www.reactos.org/mailman/listinfo/ros-dev
>
> _______________________________________________
> Ros-dev mailing list
> Ros-dev(a)reactos.org
> http://www.reactos.org/mailman/listinfo/ros-dev
>
------------------------------------------------------
Leggi GRATIS le tue mail con il telefonino i-mode di Wind
http://i-mode.wind.it/
Hello,
from the compilation log you can read:
[CC] lib\3rdparty\zlib\adler32.c
[CC] lib\3rdparty\zlib\compress.c
[CC] lib\3rdparty\zlib\crc32.c
[CC] lib\3rdparty\zlib\gzio.c
[CC] lib\3rdparty\zlib\uncompr.c
[CC] lib\3rdparty\zlib\deflate.c
[CC] lib\3rdparty\zlib\trees.c
[CC] lib\3rdparty\zlib\zutil.c
[CC] lib\3rdparty\zlib\inflate.c
[CC] lib\3rdparty\zlib\infback.c
[CC] lib\3rdparty\zlib\inftrees.c
[CC] lib\3rdparty\zlib\inffast.c
[AR] obj-i386\lib\3rdparty\zlib\zlib.a
why does it compile zlib.a (absolutely unuseful in my opinion) instead of zlib1.dll with its libz.a?
This log has been taken from the compilation of ReactOS and *not* from the "make bootcd" session.
Sincerely,
Carlo Bramini.
------------------------------------------------------
Leggi GRATIS le tue mail con il telefonino i-mode di Wind
http://i-mode.wind.it/
Hi,
This is for Eric. I couldnt find your Mail Address, so I send this to
ROS ML instead.
I uploaded a picture with the errors in German RC, which are left. Only
one Window makes problems.
http://img407.imageshack.us/img407/7514/errorsbf8.jpg
Bye
Daniel "EmuandCo" Reimer
Hi
I am thinking of doing this adding a header call ntuser.h
and put it in include/reactos/../ that contain all ntuser* syscall prototypes
next thing we need a good test frame work betwin gdi32.dll and win32k.sys
so we can check all param from gdi32 comes down to win32k are correct
or captuers ms gdi32.dll to achive this so easy as posible
I am thinking of adding a new config value or define value for win32k
that will always test the input data is correct.
example
INT
STDCALL
NtGdiExtEscape(HDC hDC,
IN OPTIONAL PWCHAR pDriver,
IN INT nDriver,
INT Escape,
INT InSize,
OPTIONAL LPSTR UnsafeInData,
INT OutSize,
OPTIONAL LPSTR UnsafeOutData)
{
PDC pDC;
LPVOID SafeInData = NULL;
LPVOID SafeOutData = NULL;
NTSTATUS Status = STATUS_SUCCESS;
INT Result;
#if gdi32_testing_on
test_NtGdiExtEscape(...);
#endif
...
...
}
test will testing see if the data should have been sent or not to win32k and vaildate everthing.
and if any error detects it print out a DPRINT1 msg
DPRINT1("Testing start");
DPRINT1("Status : fail");
DPRINT1("Status : why :");
DPRINT1("Testing end");
or
DPRINT1("Testing start");
DPRINT1("Status : Sussess");
DPRINT1("Testing end");
it is like this I want adding to win32k and thuse build in test case.
I hope you all have understanding of good testcase and testframe buildin that can be easy disable and activate.
ofcures the testframe should not be in debug build. we maybe should create a complete new target for it as well
so public can get hold of it easy.