Michael Blumenkrantz <michael.blumenkrantz(a)gmail.com> writes:
> Hi,
>
> Attached is a patch that I wrote a year ago with the help of Bernhard Loos
> (jhgf). For various reasons, I didn't get around to submitting it until now.
>
> This patch adds caching to NtMapViewOfSection() to reduce the frequency of
> blocking server requests which occur, instead replacing them with lookups to a
> wine rbtree, which is populated during NtCreateSection() and cleared during
> close_handle(). While I don't have any performance statistics to show, this
> should yield some definite benefits in nearly every modern game given that they
> all repeatedly read mmapped sections of files.
>
> Bernhard suggested to me, at the time of writing this, that there could be some
> potential compatibility issues with regard to sharing, but I don't know nearly
> enough about the internals here to speculate.
There are worse issues, like the lack of locking, and the fact that you
are slowing down the close handle path, which will impact every
application for a debatable benefit in a few cases. You'll need to show
very convincing benchmarks if you want to pursue this further.
--
Alexandre Julliard
julliard(a)winehq.org