有人制作过内存中的 GIT 存储库吗?

发布于 2024-09-02 02:48:23 字数 117 浏览 2 评论 0原文

我希望能够利用 GIT(及其工作流程)的优势,但不需要磁盘访问的成本 - 我只是想利用 GIT 的分布式修订控制功能来生成类似 memcached 和胃肠道。 (最好是在 .NET 中)

有这样的野兽吗?

I would like to be able to take advantage of the benefits of GIT (and its workflows), but without the cost of disk access - I just would like to leverage the distributed revision control capabilities of GIT to produce something like a hybrid of memcached and GIT. (preferably in .NET)

Is there such a beast out there?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

如果没结果 2024-09-09 02:48:23

为什么不直接使用 Windows 版本的 git 并使用 Process.Start() 调用它呢?

至于存储,您可以将存储库放在 RAM 磁盘中(就像上面安德鲁建议的那样),但我不确定性能增益会有多大。我认为将它放在硬盘上是完全可以的,特别是考虑到如果你经常使用它,它无论如何都会缓存在 RAM 中。

Why don't you just use the Windows version of git and call it using Process.Start()?

As for the storage, you could have the repository in a RAM disk (like Andrew suggested above), but I'm not sure how big the performance gain would be. I would think that having it on harddisk is perfectly fine, especially considering that if you use it often, it would be in cached in RAM anyway.

雪化雨蝶 2024-09-09 02:48:23

我认为这是不可能的,因为他们使用的编译器和资源不是微软开源/共享的。

从技术上讲,虽然无法阻止您在应用程序中使用 C# 作为脚本语言并使用自己的编译器进行构建……但为什么要这样做呢?

我猜这个想法是微软会为你处理这个问题。

话虽如此,也许如果你能弄清楚这些部分是什么并以编程方式调用它们,你应该能够从那里获取 JIT 处理的代码流,你可以将其放在你想要的地方(当然是理论上的),但这意味着对未记录的程序集进行不安全的调用,微软可能只是为了让生活变得更加轻松而对其进行了混淆。

有没有人看过 .Net 中实际编译器的任何源代码?
不能说我有......

不过会做出一些有趣的技巧。

但是......

在反射类中,我确信您可以在某个地方调用“Emit”,让框架编写诸如语句/类型定义的代码之类的东西,也许这些命名空间中有些东西接受 Emit 和东西的输出它进入编译过程......

多么酷的概念!

I don't think this can be done on the basis that the compilers and resources used by them are not open source / shared by microsoft.

Technically though there's no stopping you using C# as a scripting language in your apps and building with your own compiler ... but why would you?

I'm guessing the idea is that Microsoft handle that for you.

Having said that, maybe if you can figure out what the parts are and programmatically call them you should be able to grab a stream of JIT processed code from there you can put it where you want (in theory of course), but that would mean making unsafe calls in to undocumented assemblies that Microsoft have probably obfusticated just to make life real easy.

Has anyone seen any source for the actual compilers in .Net?
Can't say i have ...

Would make for some interesting tricks though.

HOWEVER ....

In the reflection classes i'm sure you can call "Emit" somewhere that gets the framework to write things like the code for statements / type definitions, maybe there's something in those namespaces that takes the output of Emit and stuffs it in to the compilation process...

What a cool concept !!!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文