mirror of
https://github.com/status-im/react-native.git
synced 2025-01-09 09:12:02 +00:00
a92f107712
Summary: @public We previously discovered that using an NSURLSessionDataTask to load local files is noticably less efficient than using regular filesystem methods. This diff adds RCTFileRequestHandler as a replacement for RCTHTTPRequestHandler when loading local files. This reduces loading time when loading local files via XMLHttpRequest, as well as improving the performance for some image load requests. Reviewed By: @javache Differential Revision: D2531710 fb-gh-sync-id: 259714baac131784de494d24939f42ad52bff41a
19 lines
548 B
Objective-C
19 lines
548 B
Objective-C
/**
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
* All rights reserved.
|
|
*
|
|
* This source code is licensed under the BSD-style license found in the
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
*/
|
|
|
|
#import "RCTURLRequestHandler.h"
|
|
#import "RCTInvalidating.h"
|
|
|
|
/**
|
|
* This is the default RCTURLRequestHandler implementation for file requests.
|
|
*/
|
|
@interface RCTFileRequestHandler : NSObject <RCTURLRequestHandler, RCTInvalidating>
|
|
|
|
@end
|