Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

list.Joined is uselessly copying data instead of being lazy #1254

Closed
victornoel opened this issue Dec 1, 2019 · 12 comments
Closed

list.Joined is uselessly copying data instead of being lazy #1254

victornoel opened this issue Dec 1, 2019 · 12 comments

Comments

@victornoel
Copy link
Collaborator

I believe list.Joined could be implemented by storing the underlying Lists and delegating to them in each of the methods of List.

This would in particular be done by storing as a state of Joined an ordered collection (i.e., a list) of the underlying lists and computing the corresponding indexes of the elements dynamically.

There would be the need to introduce maybe some implementations for the iterators to do the same.

@0crat
Copy link
Collaborator

0crat commented Dec 1, 2019

@paulodamaso/z please, pay attention to this issue

@paulodamaso
Copy link
Contributor

@victornoel Let's first decide about cactoos lists fate in #1242 right?

@victornoel
Copy link
Collaborator Author

@0crat in

@baudoliver7
Copy link
Contributor

@0crat status

@0crat
Copy link
Collaborator

0crat commented Feb 3, 2021

@0crat status (here)

@baudoliver7 This is what I know about this job in C63314D6Z, as in §32:

@baudoliver7
Copy link
Contributor

@victornoel I dont catch very well what you mean. Could you give me more explanations ?

@victornoel
Copy link
Collaborator Author

@baudoliver7 currently, when you call the constructor of list.Joined, it will build a new list by copying the arguments. Instead, we should implement the List interface (and most certainly ListIterator) to wrap the lists passed as arguments and delegate to them as if they were one list.

baudoliver7 pushed a commit to baudoliver7/cactoos that referenced this issue Feb 26, 2021
baudoliver7 pushed a commit to baudoliver7/cactoos that referenced this issue Mar 7, 2021
@victornoel
Copy link
Collaborator Author

@baudoliver7 thx

@0crat 0crat added the qa label Mar 8, 2021
@0crat
Copy link
Collaborator

0crat commented Mar 8, 2021

@sereshqua/z please review this job completed by @baudoliver7/z, as in §30; the job will be fully closed and all payments will be made when the quality review is completed

@0crat 0crat removed the 0crat/scope label Mar 8, 2021
@sereshqua
Copy link

@0crat quality good

@0pdd
Copy link
Collaborator

0pdd commented Mar 13, 2021

@victornoel 2 puzzles #1561, #1562 are still not solved.

@0pdd
Copy link
Collaborator

0pdd commented Jul 11, 2022

@victornoel 2 puzzles #unknown, #unknown are still not solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants