AsyncDisplayKit icon indicating copy to clipboard operation
AsyncDisplayKit copied to clipboard

ASMultiplexImageNode Multiple Issues

Open rajeevwhiz opened this issue 10 years ago • 7 comments

Hi @appleguy @maicki @Adlai-Holler,

Attached is the Sample project that replicate following issues:

-- Issue 1: ImageCellNode uses ASMultiplexImageNode. urlForImageIdentifier is being called but Images are not showing up in the ASCollectionNode -- Issue 2: ASMultiplexImageNode also does not show placeholder image. placeholderImage() method is in place but the image is being ignored. However, ASDisplayNodeDefaultPlaceholderColor() is working -- Issue 3: Images are being loaded from Photo Library using PHPhotoLibraryChangeObserver and also showing up in the Collection. However, urlForImageIdentifier is being called for every image identifier, thereby loading image of all sizes and increasing memory use exponentially!

I would really appreciate any tips or workarounds. Thanks, Rajeev

CustomCollectionView.zip

rajeevwhiz avatar Nov 09 '16 19:11 rajeevwhiz

Refer to #2578 for more details

rajeevwhiz avatar Nov 09 '16 19:11 rajeevwhiz

@appleguy Fixed Issue#1 by removing ASImageDownloaderProtocol for now. Issue#2 is not critical.

However, Issue#3 is puzzling.. it's happening irrespective of whether I download image from URL or from local cache or from Photo Library.

How does the framework know which image identifier to use when? That's the missing link, I think.. I don't see I am establishing this linkage anywhere...

rajeevwhiz avatar Nov 09 '16 21:11 rajeevwhiz

Regarding Issue#3, I have imageNode?.downloadsIntermediateImages = false but I still see images of all sizes being downloaded.

rajeevwhiz avatar Nov 09 '16 22:11 rajeevwhiz

Some clarification Questions:

-- Does ASMultiplexImageNode use some caching by default or do I have to implement ASImageCacheProtocol? -- What's the use case where I may be required to implement ASImageDownloaderProtocol?

rajeevwhiz avatar Nov 09 '16 23:11 rajeevwhiz

@appleguy , @maicki , @Adlai-Holler -- attached is the sample project that reproduces Issue3 CustomCollectionView.zip

rajeevwhiz avatar Nov 11 '16 15:11 rajeevwhiz

Hi @rajeevwhiz we rely on Github issues to track work being done on ASDK. It's really important that each issue describe one problem. Would you mind updating this issue to just one of the issues you're describing and opening two more each with their own? You can still use the same sample project of course!

garrettmoon avatar Nov 14 '16 21:11 garrettmoon

looks like I misinterpreted the purpose of DidUpdate... that's called everytime a node refreshes... but it doesn't mean the image is being downloaded. I implemented progressUpdate and that's only called once per image!!

I am closing this as it's not an issue.

rajeevwhiz avatar Nov 20 '16 00:11 rajeevwhiz