Firebase 在绝对路径上运行还是在ref+;相对路径?

Firebase 在绝对路径上运行还是在ref+;相对路径?,firebase,Firebase,哪一个更快?还是没有区别 选择1 const rootRef = new Firebase(process.env.FIREBASE_URL) const absolutePath1 = '/foo/bar/hello' const absolutePath2 = '/foo/bar/yoda' rootRef.child(absolutePath1).update(...) rootRef.child(absolutePath2).update(...) 选择2 // ref points

哪一个更快?还是没有区别

选择1

const rootRef = new Firebase(process.env.FIREBASE_URL)
const absolutePath1 = '/foo/bar/hello'
const absolutePath2 = '/foo/bar/yoda'

rootRef.child(absolutePath1).update(...)
rootRef.child(absolutePath2).update(...)
选择2

// ref points to '/foo/bar'
ref.child('hello').update(...)
ref.child('yoda').update(...)

相对于另一个URI计算的相对路径。但绝对路径并没有。没有什么比性能或效率更重要

你是说选项1和选项2的性能相同?你能澄清第一句话吗?他们两人的表现都一样。相对于根目录的路径称为绝对路径。引用当前目录的路径称为相对路径。绝对路径准确地告诉浏览器去哪里。通过互联网传输字节的速度将大大超过连接字符串的任何处理速度。因此,不会有显著差异。另外,这两个字符串在内部没有什么不同,只是两个字符串要分开/连接起来。@Kato,yea Mohammed昨天回答了这个问题。@Kato,yea Mohammed昨天回答了这个问题。