Necko
Jump to navigation
Jump to search
TODO (for Gecko 1.9)
- Introduce nsBaseChannel from which other channels may subclass. This will help us consolidate duplicated code that is currently spread across each channel implementation and avoid inconsistencies in the process. It should also help reduce codesize a bit.
- Support IRIs better. This includes supporting %-escape sequences in hostnames. It also includes encoding non-ASCII URL parts to UTF-8, or more likely doing what other browsers do (which entails leaving the query parameters encoded in the origin charset).
- Introduce asynchronous authentication prompt API.
- Make it easier to use Necko from JS. Make use of nsIClassInfo to automatically reflect interfaces. Make it easier to work with streams from JS. nsIScriptableInputStream needs to be replaced with something better, for example.
- Improve support for synchronous HTTP requests. This likely translates to an overhaul of the event queue system.
- Support unicode file paths. This impacts the way we encode file URLs. Currently, we encode them in the "native filesystem charset" and then %-escape any non-ASCII bytes. This is not going to work if we wish to support full unicode file paths because the conversion from unicode to "native filesystem charset" may be lossy.
- Optimize nsIURI construction (nsStandardURL::SetSpec). We may be able to shave off some cycles here by ensuring that the input string is assigned directly to mSpec when it is determined that no canonicalization is required. This will in many cases allow us to simply share the given string buffer instead of having to copy it.
- Improve disk cache: increase its default size, eliminate eviction-on-hash-collision (?), delay writing to disk when data is less than 16k, account for actual disk usage better.
Comments from Alfred (2005/Oct/15)
- Increase supported datasize (files bigger than 64M are wrongly accounted, and make eviction confused) (in nsDiskCacheRecord, the max.size for metadata can easily be reduced (as the current max'es on 16K for metadata), providing more bits to use for max. datasize.
- Image 'caching': because 'active' images are never evicted, the total size of the image cache can be much bigger than the 'hard limit'. May be find a way to forcefully evict the decoded image data from the cache, while the original encoded format is still available (generally)?
- Merge nsDiskCacheDevice and nsDiskCacheMap.
- In nsDiskCacheEvictor::VisitRecord, prevent the malloc's for reading the complete 'DiskCacheEntry' and for the key copying just to check for clientID, instead make a custom version of ReadDiskCacheEntry to just check for clientID in the stored entry on disk.