arrow-core icon indicating copy to clipboard operation
arrow-core copied to clipboard

Inline functions create additional anonymous class declaration

Open pakoito opened this issue 6 years ago • 5 comments

Each inline declaration of a function, i.e. pipe, it may force callsites to create an anonymous class to capture the scope. This is an issue in Android land, due to the dex format and its limitations around method count and size.

If we can validate this assumption in the bytecode viewer, it's worth consider doing a pass on the codebase and remove many unnecessary inline annotations.

What'cha think.

pakoito avatar Aug 01 '18 22:08 pakoito

I'll have a look

MarioAriasC avatar Aug 02 '18 01:08 MarioAriasC

Is there any update on this?

Laimiux avatar Aug 30 '18 23:08 Laimiux

I did a pass on some of the core datatypes: https://github.com/arrow-kt/arrow/pull/971

For arrow-syntax we'll do it if necessary.

pakoito avatar Aug 31 '18 03:08 pakoito

I think it would be valuable to remove inline at least from pipe and partially functions (at least from our use cases). I could do a pass on arrow-syntax.

Laimiux avatar Sep 07 '18 21:09 Laimiux

Go for it, thanks!

pakoito avatar Sep 07 '18 21:09 pakoito