Skip to content

Make LurchTable work on Xamarin.iOS #16

@ste8

Description

@ste8

We are trying to run Lucene.Net 4.8 on a Xamarin.iOS app, but it doesn't work due to the fact that it depends on LurchTable, that uses some instructions not fully supported by Xamarin.iOS compiler.

In particular, the compiler seems to have problems with the structs that implement generic interfaces, and within LurchTable there are several of them.

This problem has been discussed here mono/mono#7016
It seems that the guys at Mono tried to support these instructions, but I think it didn't work and in one of the last comments they say "The LurchTable was quite a complex code that was not necessary for the particular use. In fact it used so complex generics that it managed to break Mono AOT in some cases".

In Lucene.Net, LurchTable was preferred to other LruCache implementations because their performance weren't good enough, so it make sense to continue to use LurchTable, but we'd like to find a way to make it work on Xamarin.iOS as well (Lucene.Net is trying to support also this platform).

We made a test, converting the generic structs inside LurchTable with classes: the test worked, but we don't know if this fix is right, regarding both performance and correctness.

Can you suggest the correct way to make LurchTable work in Xamarin.iOS as well?

PS: just to be clear, LurchTable works on Xamarin.iOS when the app is compiled for iOS simulator, but it doesn't work when is compiled for the devices, using the AOT compiler.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions